You are attempting to migrate a user to Exchange Online, but when you open the admin console and search for the user, the user is not in the list. This occurs because O365 already has a mailbox for this user. When assigning a license to an object in MSO, it provisioned a user mailbox. Since a Cloud mailbox was provisioned, the user now has dual mailboxes. This means there is a mailbox on premise still and a mailbox in Exchange Online. Dual mailboxes are not advised to have when dealing with O365 because it could cause proxy lookup issues, or users will complain that they are not getting all their emails. In order to resolve this issue, we have to delete the new cloud object and migrate the on premise object to O365. Here are the steps to do so.
- In Exchange Online Powershell verify the recipient type. If user mailbox, then you need to remove the mailbox.
- Get-recipient [alias]
- Go On premise to see what the recipient type is as well. Run the same cmdlet as step 1.
- If verified that we have 2 different mailboxes, then we need to purge the cloud mailbox since it is new and has no data. Please be sure that the user is not using OneDrive or Sharepoint, if so this data will need to be backed up prior to deleting the msol account. After deleting the MSOL account the OneDrive and Sharepoint data will be gone.
- Next Get the External Directory Object ID from the O365 mailbox.
- Get-Mailbox [alias] |fl *external*
- Verify the msoluser account.
- Get-msoluser -objectid [inset external object ID from step 4]
- Remove the msol account
- Remove-msoluser -ObjectID [insert object ID from step 4]
- Purge the msol user account
- Remove-Msoluser -objectID [insert objectID from step 4] -removefromrecyclebin
- Verify the object is gone.
- Run the same cmdlet from Step 5.
- Initiate a Dirsync Cycle
- Go back to the O365 portal, verify a new object has been created.
- Or you can run Get-msoluser -userprincipalname [Insert upn] | fl … You will see a new object ID.
- Next go back in the Exchange Admin Center and migrate the user account.