O365 different domain

Hallo. I have some problems with O365 integration.
The new created accounts (after successfully log into) has the default email value from Microsoft accounts.
But what when we want to change default domain name (example: company.domain.com) to another one (something.domain.com). It’s possible using scrips/settings in config files?

What domain name are you talking about?
Your FQDN of the Zammad instance or those of the email accounts?

For exaple: my account in MS365 is user.beta@ax.com and after succesfully login by module integration user with ID: 32244524234234fddfd was created. His email is: user.beta@ax.com but I wanted to simply CHANGE this email to: user.beta@ayy.com.

I wrote simple script which is searching in DB and changing *.ax.com to *.ayy.com every few minutes.

That is the worst thing you can do.
We strongly encourage everyone not to write directly to Zammads database.

You’re bypassing caching mechanisms and also data validation stuff.
I don’t see why you can’t just update the users email address once via UI. It should stay that way. Have you tried?

If it gets automatically updated without the user doing anything, there’s definitely something else doing it for you.

I have 2000 users and they are loging in by MS365.
After sucesfully loging in they wanted to crete a ticket immediately-so I have NO TME to manual changing the domail address. They wantet to get email about ticket status to OTHER domain that is connected to MS365. So…
After the user is created automatically with login looks like:
8f50405d-a0fe-47a2-82b5-a35f and
my siple script is changing *.ax.com to *.ayy.com every few minutes.

Well sorry I can’t help you then.

Can we do this better way? For examlple with ruby script?

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.