Exchange Online: Fixing an Perplexing Exchange Migration Issue (Part 1)

Hi, its been a while since I posted a blog entry.  Its been very busy.  But, I have been tackling a problem for the last couple days and finally solved it today so I thought that I would document it so that everyone else could benefit.  Also, if I should forget the fix (most likely), I’ll scan back here for the solution clip_image002

Situation:  I have a scenario where the customer had created an Office 365 tenant and some cloud ids with Exchange mailboxes.  They were playing around in that environment to learn about Office 365 and Exchange Online.  After their evaluation, they decided to move to Exchange Online.  So, they setup directory synchronization and Exchange hybrid configuration.  Now, when they attempted to move mailboxes to the cloud, they got the following error:

“Error: InvalidRecipientTypeException: Unsupported recipient type ‎’Mailbox‎’ provided. Only ‎’Mailuser‎’ is supported for this migration type. ”

Troubleshooting:  The problem is that since the customer had created mailboxes in Office 365 to play around with, the migration tool raised an error when they attempted to migrate the user’s on-premises mailbox to the cloud.

The Exchange migration tool expects Mailuser type in the cloud, not UserMailbox [User with a mailbox.]  You can run get-user in Powershell against Exchange Online to check the user type.  See here to establish remote powershell.


Resolution:  Since the user’s were synchronized with Directory Sync into Office 365, I couldn’t edit the users directly in Office 365.  So to remove the Exchange mailbox in O365, we removed the Exchange Online license from the user in O365.  To do this, go to O365 Portal > Users > Active Users.  Check a user to edit and select Edit on the right frame next to Assigned License.  Uncheck the “Exchange Online” license.

clip_image004 clip_image006

By doing this step, Exchange Online removes the Exchange mailbox from the user’ in Office 365.

However, the user in Office 365 still had some bad data in their user objects in Azure AD on Office 365.  Since, I couldn’t’ direct delete the user objects in Office 365 since they were synchronized from on-premises, I had to take a different approach to cleaning up Azure AD.  I moved all the users into an OU on the on-premises’s Active Directory.  Then, I filtered that OU from being synchronized by Azure AD Sync.  Then, I initiated a Full Import, Full Sync, and Export.  This cleaned up the Azure AD of the user’s objects.  Then, I added the OU back into the Azure AD Sync.  This recreated the users in Azure AD.  Also, check that there are objects created in the Office 365 > Exchange Admin Center > Recipients > Contacts.


The user type should be “Mail User”.  Yay!.  This is what is needed to migrate a user from on-premises Exchange to Exchange Online.  There was another issue that popped up next but that is for a future blog entry.



This entry was posted in Exchange, Office 365 and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s