You try to replace the Primary email address (PrimarySMTPAddress) OR a secondary email address/Alias on a mailbox in Exchange Admin Center. After replacing the email address, you save the changes. Reopen the mailbox properties, you see the FREAKING primary email address still FREAKING there.
I am sure you tried to replace the email address using
Set-Mailbox -Identity MailboxName -PrimarySMTPAddress Name@newdomainname.com
Command runs and no errors seen. BUT the PrimarySMTPAddress is still FREAKING there. What the HELL is going on here?
Here is the solution: Replace WindowsEmailAddress and MicrosoftOnlineServicesID with the new email address first on Mailbox properties, then modify the PrimarySMTPAddress. Here are the sample PowerShell cmdlets:
Set-Mailbox -Identity MailboxName -MicrosoftOnlineServicesID name@newdomainname.com
Set-Mailbox -Identity MailboxName -WindowsEmailAddress name@newdomainname.com
Set-Mailbox -Identity MailboxName -PrimarySMTPAddress name@newdomainname.com
If you are changing the secondary email address/alias, use this cmdlet:
Set-Mailbox -Identity MailboxName -EmailAddresses @{Remove="oldemail@domain.com"}
Set-Mailbox -Identity MailboxName -emailAddresses @{Add="newemail@domain.com"}
Hope that was as easy as this solution. Enjoy!