Unable to Migrate user to Exchange Online. User not showing in Migration tool.


Hey Guys,

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.

  1. In Exchange Online Powershell verify the recipient type. If user mailbox, then you need to remove the mailbox.
    1. Get-recipient [alias]
  2. Go On premise to see what the recipient type is as well. Run the same cmdlet as step 1.
  3. 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.
  4. Next Get the External Directory Object ID from the O365 mailbox.
    1. Get-Mailbox [alias] |fl *external*
  5. Verify the msoluser account.
    1. Get-msoluser -objectid [inset external object ID from step 4]
  6. Remove the msol account
    1. Remove-msoluser -ObjectID [insert object ID from step 4]
  7. Purge the msol user account
    1. Remove-Msoluser -objectID [insert objectID from step 4] -removefromrecyclebin
  8. Verify the object is gone.
    1. Run the same cmdlet from Step 5.
  9. Initiate a Dirsync Cycle
  10. Go back to the O365 portal, verify a new object has been created.
    1. Or you can run Get-msoluser -userprincipalname [Insert upn] | fl … You will see a new object ID.
  11. Next go back in the Exchange Admin Center and migrate the user account.
Comments (2)

  1. Ken Merrigan says:

    Hi. I believe I have this case. When I run the PS get-recipient it shows “MailUser” . The onprem PS shows “UserMailbox”, which makes sense as the MB is active onprem. However, the Get-Mailbox [alias] | fl *external* returns an error:

    The operation couldn’t be performed because object ‘alias’ couldn’t be found on
    ‘DM2PR04A002DC08.NAMPR04A002.prod.outlook.com’.

    I believe this may be because I cleaned up the email addresses associated with this account, then changed the alais, and removed the O365 account with the “remove-msoluser -userprincipalname” command. I let it resync overnight before attempting the migration, only to find that the user does not appear in the list of mailboxes that are available for migration.

    Any suggestions. I would like to avoid MS Support if possible.

    1. Hi Ken,

      When you run the remove-msoluser -userprincipalname, its should move the user to the recyclebin and keep it there for 30 days.
      Try this cmdlet, to see if its in the recyclebin. Get-MsolUser -ReturnDeletedUsers
      If so, then you will need to run the remove-msoluser -userprincipalname -removefromrecyclebin to completely purge the user. Then run Dirsync to create a new object.

Skip to main content