Office 365: Add additional accepted domain to SMTP Address


If you have configured Hybrid integration between Exchange 2010/2013 with Office 365 using dirSnyc or Azure active directory sync tool and then stopped the synchronization. The accepted domains and additional domains will be removed from the user’s Attributes on the cloud and in order to add these accepted domains again to all of the Office 365 users..


First we’ll have to connect to Exchange online with the following powershell tool. so Launch Azure powershell as Admin and copy the following line by line.


1- $UserCredential = Get-Credential

2- $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri -Credential $UserCredential -Authentication Basic -AllowRedirection

3- Import-PSSession $Session




First we’ll show/view user’s existing SMTP addresses, in order to do so we’ll use the following PowerShell cmdlet


For all users

4- Get-Mailbox | fl –property Alias, WindowsLiveID, EmailAddresses


Get-Mailbox –Identity | fl –property Alias, WindowsLiveID, EmailAddresses

For one user



Procedure to add an additional accepted domain to all users in the Office 365 tenant.



The domain must be verified on Office 365 first before applying those steps



$users = Get-Mailbox



foreach ($a in $users) {$a.emailaddresses.add(“smtp:$($a.alias)”)}




$users | {308b10a016e19a1cd6a208cbc3961927e16fc6766a4020d3c4ef54ea17925f0f}{Set-Mailbox $_.Identity -WindowsEmailAddress $_.WindowsEmailAddress}


Hope you find this useful.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.