Edit: I’ve posted a video of this here
In a hybrid environment, when a mailbox is migrated from on-premise to Exchange online, it will retain its primary SMTP email address. But what about when you create a new user who has never had a mailbox on-premise?
When you assign an Office 365 license, and a mailbox is created, you might find that the primary email address is set to the Microsoft Online Email Routing Address (e.g. domain.onmicrosoft.com).
Further, if you try to modify the primary email address you may get the following error
In a Hybrid environment, your active directory is synced with Office 365 using Azure Active Directory Sync tool (DirSync). Therefore your on-premise active directory is the authority and you need to manage the attributes of the user accounts from your on-premise active directory, not Office 365.
There are two ways to change the users primary email address:
(1) Use Active Directory Users and Computers (ADUC) to update the “E-mail” attribute on the properties of the user account
(2) Use ADSIEdit to modify the “proxyaddresses” attribute of the user account
- Go to Start > Run and type adsiedit.msc
- Find the user account > Properties
- Edit the proxyAddresses attribute
- Add primary email address in this format
- SMTP:email@example.com (uppercase SMTP)
- Add secondary email addresses in this format
- smtp:firstname.lastname@example.org (lowercase SMTP)