Issue: migration of mailbox from on premise exchange to exchange online fails with the following error:
Error: MigrationPermanentException: The target mailbox doesn’t have an SMTP proxy matching ’westernpartitions.mail.onmicrosoft.com’. –> The target mailbox doesn’t have an SMTP proxy matching YOURPRIMARYEMAILDOMAIN.mail.onmicrosoft.com’.
Diagnosis:
review the email addresses of the account you’re trying to move to see if its stamped with a *.mail.onmicrosoft.com email address. If it is not, see next section:
Solution:
Review your email address policies to see if any policies are higher priority than the default policy that are applying to your mailboxes and if these higher policies are missing the mail.onmicrosoft.com email address format. If so, copy the mail.onmicrosoft.com email address from your default policy and add it as an alias to the policy that is missing it.
The following EMS commands can be used to ‘see’ hidden policies that may not show in the EAC GUI:
get-emailaddresspolicy -includemailboxsettingonlypolicy
I found that removing old mailbox management policies fixed my issue using the command remove-emailaddresspolicy