"User is already being moved‎" error when you move mailboxes from on-premises to Exchange Online in a hybrid deployment

Applies to: Exchange OnlineExchange Server 2019Exchange Server 2016 More

Symptoms


Assume that you have a hybrid deployment of Microsoft Exchange Server and Exchange Online in Office 365. When you try to move mailboxes from on-premises to Exchange Online, you receive an error messages that resembles one of the following:

Error: UserAlreadyBeingMigratedException: The user ‎'Name‎' already has a pending request. Please remove the existing request and resume the current batch or start a new batch for this user. --> Mailbox ‎'Name' is already being moved to ‎'Cloud Database Name‎'.
Error: MigrationPermanentException: The onboarding move could not be created because user ‎'Name' is already being moved. --> The onboarding move could not be created because user ‎'Name‎' is already being moved.

Cause


This issue may occur if one of the following conditions is true:

  • You already have a move request (active or orphaned) in Exchange Online for that user. In this scenario, the error message most likely is as follows: 
  • You already have a move request (active or orphaned) in on-premises Exchange Server for that user. In this scenario, the error message is most likely as follows: 

Resolution


To fix this issue, use the following method.

Step 1: Identify the move request for the affected user

    Get-MoveRequest -Identity 'user@contoso.com'
    Get-MoveRequest -Identity 'user@contoso.com'

Note If you’re unsure about the identity of the user, you can output all move requests by running the Get-MoveRequest command to find the affected user.
 

Step 2: Verify and delete the move request or move references

You can check the status of a user move request that you find in either on-premises or Exchange Online. The status will most likely be in a Completed or Failed state. You have to remove this move request in order to be able to create a new move request to migrate the user to Exchange Online.

If the move request that has to be deleted isn't associated with a migration batch or a migration user, you can run Remove-MoveRequest directly in PowerShell. Otherwise, we recommend that you remove the corresponding migration batch or corresponding migration user from that batch. This should also take care of the move request removal.

If you don’t find a move request for the user in the on-premises or Exchange Online organizations, and you still receive a "user is already being moved" error message, you will have to manually clean up the move references for that user from your on-premises Active Directory container.

To do this, follow these steps:

  1. Open Active Directory Users and Computers in Domain Controller (DC) server.
  2. Locate the affected user, click View, select the Advanced Features check box, and then open the Attribute Editor tab.
  3. Look for msExchMailboxMove* attributes, and check whether any value is set for that user.

For example, msExchMailboxMoveRemoteHostName is populated by the <tenant.onmicrosoft.com> value if there was at least one attempt to move the user to Exchange Online.

If the move request was successfully removed from Exchange Online (that is, you don't find it by running Get-MoveRequest in Exchange Online PowerShell) but the msExchMailboxMoveRemoteHostName attribute is set, this suggests that the move reference was not cleared up correctly from on-premises Azure Active Directory (Azure AD). In this scenario, you have an orphaned move request for that user.

Another example for an orphaned local move request for a primary or archived mailbox would be if there's no move request on-premises for it, but there are attributes set, such as the following:

msExchMailboxMoveSourceMDBLink
msExchMailboxMoveTargetMDBLink
msExchMailboxMoveSourceArchiveMDBLink
msExchMailboxMoveTargetArchiveMDBLink

  1. Manually clear the value in Azure AD, and then create another move request in Exchange Online for that user.