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 (8)

  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

    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.

  2. Michael Clutt says:

    Thanks this has been a life savor. But is there any indication as to why the users get stuck and not able to be migrated?

  3. Michael Clutt says:

    Thanks this has been a lifesaver. But is there any indication as to why the users get stuck and not able to be migrated?

  4. Sagar Lohar says:

    Thanks for the solution Dom. Resolved my issue today…

  5. Matthew Wyld says:

    Thanks for the solution! Just in case anyone has the same, after removing the accounts I had to re-run an initial sync by running Start-ADSyncSyncCycle -PolicyType Initial to pull the user back over.

    1. Sean Breddy says:

      In order for AD Connect to sync the account back to online it needs to detect a change on-prem, you could add an email address or change another sync’d attribute.

  6. shiv2000 says:

    I would like to suggest here a very effective and secure migration software named as Kernel Migrator for Exchange. The software can help in Exchange-to-Exchange direct migration, Exchange (on-premises) to Office 365 migrations. Office 365 to Office 365 migrations. To know more, visit: https://www.nucleustechnologies.com/exchange-migration/

Skip to main content