The PrimarySmtpAddress attribute of an Exchange Online mailbox is the primary email address used as the sender of outbound emails.
You can retrieve the value of the PrimarySmtpAddress using the following command from the Exchange Online Management module:
PS C:\> Get-Mailbox lene.hau | fl DisplayName,PrimarySmtpAddress DisplayName : Lene Hau PrimarySmtpAddress : lene.hau@azure.skrubbeltrang.com
Change the PrimarySmtpAddress for Cloud-Only Users
If the user is cloud-only (not synchronized from your on-premises Active Directory), then you can edit this attribute directly in Exchange Online.
Go to the Exchange Online Admin Center and locate the mailbox.
Then select the mailbox, click Edit, and click Email Address:
Then edit the user name and domain name of the email address, and click save:
Change the PrimarySmtpAddress for Synchronized Users
If the user is synchronized from your on-premises Active Directory, then the PrimarySmtpAddress is dictated by the primary email address configured on the on-premises user account.
Trying to modify the PrimarySmtpAddress from Exchange Online will cause an error.
The primary email address in the on-premises Active Directory is configured by the multi-valued property called ProxyAddresses.
Specifically, the primary email address is the value prefixed by capital “SMTP:” as seen in the following sample output:
PS C:\> (Get-ADUser lene.hau -Properties *).proxyAddresses SMTP:lene.hau@azure.skrubbeltrang.com smtp:lene.hau@e365m.onmicrosoft.com smtp:lene.hau@e365m.mail.onmicrosoft.com
The easiest way to change the primary email address in an on-premises Active Directory is by using the Easy365Manager snap-in:
The Easy365Manager snap-in for AD Users & Computers will check the email address’s validity and that the email address is unique across your organization.
With Easy365Manager, you can also manage Exchange Online mailbox properties like delegation and calendar permissions directly from user properties in AD Users & Computers.
Get an overview of the many features of Easy365Manager here.
Alternatives to using Easy365Manager are direct editing of the proxyAddresses attribute using ADSIEdit, ADUC with advanced view enabled, or using PowerShell.
These options don’t check the validity of the values entered, nor do they check for uniqueness across your organization. This can lead to issues that are hard to troubleshoot.
You can also use Exchange on-premises to modify the proxyAddresses attribute. However, many modern organizations prefer to run a simple snap-in like Easy365Manager instead of a bloated, costly, and malware-targeted Exchange on-premises server.