Cannot migrate user from Exchange 2010 to Exchange Online

So I came across this error while migrating some accounts from On-Premise Exchange 2010 Server to Exchange Online.

Error: The subscription for the migration user user@domain.com couldn’t be loaded. The following error was encountered: A subscription wasn’t found for this user.

migrationbatch

In short, there is an address conflict between the user properties of the exchange server and the synced object on Office365. Lets go back to the basics to get this fixed.

Environment: Exchange 2010 in Hybrid Mode with Exchange Online. Migrating accounts using a staged migration approach. The problematic user in Exchange Online is properly licensed.

Setup for Staged Migration.

  • Exchange Online: Stop the problematic migration batch and delete it
  • Exchange 2010: Even though the user account may show that it is a Remote mailbox or just a User Mailbox. Right click and hit Disable. (This will remove the exchange properties for the user.)
    option1
  •  option2
  • Exchange 2010: Search your Exchange database and find the user’s on-premise mailbox. This is easier if you have just 1 or 2 databases. In an enterprise environment this may be a task by itself. Open EMS and type the following:
    If the result set it too long, you may want to save the contents to a file.
    Open the file and search for the user you disabled in step 2
  • Now you need to delete the problematic user in Exchange Online. Open up PowerShell ISE and type the following:
    After supplying the Global Admin credentials and successfully logging in, do the following:
  • Now the object is not in Exchange 2010 and Exchange Online
  • Attach the user back to Exchange 2010. Open up EMS and type the following:
  • The mailbox should show up in Exchange 2010. Make sure that the SMTP address includes: jdoe@vanitydomain.mail.microsoft.com address.
  • In a  few minutes DirSync will sync the object back to Exchange Online (This depends on your DirSync time interval)
  • When the user shows up – make sure you assign the user a license in Exchange Online.
  • Start a new migration batch for the user.
  • Migration will go through as expected.