User get instead of default domain't%20have%20on-premises%20exchange%20online.%20Is%20it%20possible%20to%20let%26nbsp%3B%20Active%20Directory%20run%20a%20script%20automatically%20(after%20creating%20a%20new%20user)'s%20the%20way%20to%20go%3A%20you%20need%2



I got an environment with a local AD, synced with AAD. If I create a user on the local AD with and sync this with AAD. The user get the right UPN in AAD, also in -> users. is default. But only in Exchange Online the user get I can quick fix that to fill the Mail attribute in the Local AD and sync this again. But I want to fix it that if I create a user, he get the right email domain in Exchange Online.


Also under EXO -> accepted domain is as default.


Please guys help me out,


Thanks in advance





5 Replies
Without exchange Onpremises which sets this I believe you need to set the primary email address in AD (mail/proxyaddresses attribute ) manually
Normally with many users I’d do this with powershell

@adam deltinger  Thank you for the fast reply. You are right we don't have on-premises exchange online. Is it possible to let  Active Directory run a script automatically (after creating a new user) so he can set the primary address? 

Yes, it is and that's the way to go: you need to be sure your AD is well prepared in terms of user attributes to make the sync in the right way
Yeah, bulk update existing users with a script and make a script running for each new user
Alright, thanks guys for helping me out :)