I got an environment with a local AD, synced with AAD. If I create a user on the local AD with User.LogonName@mydomain.com and sync this with AAD. The user get the right UPN in AAD, also in admin.microsoft.com -> users.
Mydomain.com is default. But only in Exchange Online the user get User.LogonName@mydomain.onmicrosoft.com. 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 mydomain.com as default.
@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?