Quite often, whilst helping customers with migrations from Exchange to Exchange Online, I have come across issues with missing proxy addresses preventing the migration of mailboxes to Exchange Online. This most commonly due to missing <tenant>.mail.onmicrosoft.com proxy addresses.

When building the Exchange Hybrid with your Exchange organisation, the Hybrid Configuration Wizard (HCW) adds the following proxy address into the email address policies:

  • @<tenant>.mail.onmicrosoft.com

However, some mailboxes may not be inheriting the email address policy, and therefore do not receive the necessary proxy address required for the migration to Exchange Online.

To overcome this issue, you will need to identify the on-premises Exchange mailboxes which do not carry the email address policies, or the required proxy address, and then add the proxy address to the mailbox prior to migration.

To identify the on-premises mailboxes, run the following Exchange Management Shell cmdlet, changing the <tenant> in the syntax:

  • $NoProxyMailboxes = Get-Mailbox -ResultSize Unlimited | ? {($_.EmailAddressPolicyEnabled -eq $False) -or ($_.EmailAddresses -NotLike “*@<tenant>.mail.onmicrosoft.com”)} | Select UserPrincipalName,Alias

You can view the results using the cmdlet below:

  • $NoProxyMailboxes

Once you have identified the mailboxes which do not have the required proxy address, use the following Exchange Management Shell cmdlet to set the proxy address on the mailboxes:

  • $NoProxyMailboxes | ForEach {Set-Mailbox -Identity $NoProxyMailboxes.UserPrincipalName -EmailAddresses @{add=$NoProxyMailboxes.Alias+”@<tenant>.mail.onmicrosoft.com”}}

To test this, you can use the -WhatIf statement on the end of the cmdlet, like below:

  • $NoProxyMailboxes | ForEach {Set-Mailbox -Identity $NoProxyMailboxes.UserPrincipalName -EmailAddresses @{add=$NoProxyMailboxes.Alias+”@<tenant>.mail.onmicrosoft.com”} -WhatIf}

Finally, once these have processed, you can check the proxy addresses have been added by using the Exchange Management Shell cmdlets below:

  • $NoProxyMailboxes = Get-Mailbox -ResultSize Unlimited | Select UserPrincipalName,EmailAddresses

The only actions you now need to take is to wait for directory synchronisation of the attributes to show in Exchange Online and to re-try the migration!