Can't migrate on-premises primary mailbox with cloud-based archive to Exchange Online

Symptoms

In an Exchange hybrid deployment, you have an on-premises Microsoft Exchange Server primary mailbox, and a cloud-based archive mailbox in Exchange Online. You try to migrate the on-premises primary mailbox to Exchange Online by using the New-MigrationBatch or the New-MoveRequest cmdlet together with the PrimaryOnly switch. In this scenario, you receive the following error message:

The archive database is not explicitly set on the mailbox. Hence a primary only move cannot be allowed for this user.

Cause

This error is triggered by a validation check in Exchange Online for the move request. The error might occur because you have dual archive mailboxes (an on-premises archive mailbox and a cloud-based archive mailbox), and they share the same value for the ArchiveGuid parameter. This situation isn't supported. Therefore, the migration fails and generates the error to avoid losing archive data in the affected on-premises primary mailbox.

Note: The only supported split-archive scenario is an on-premises primary mailbox and an archive mailbox in Exchange Online.

Resolution

To fix this issue, follow these steps:

  1. Check the ArchiveGuid property value of both the on-premises and cloud-based archive mailboxes:

    If both archive mailboxes have the same ArchiveGuid property value, go to Step 2. Otherwise, create a support request.

  2. Back up and export the on-premises archive mailbox to a .pst file:

    1. Open the Exchange admin center.

    2. Select recipients > mailboxes > More options ( ) > Export to a PST file.

    3. On the Export to a .pst file page, select the source mailbox, and then select Export only the contents of this mailbox's archive > Next.

    4. Specify the path to export the .pst file, and then select Next > Finish.

    For more information, see create mailbox export requests.

  3. Add the domain of the cloud-based archive mailbox to the ArchiveDomain property of the affected on-premises primary mailbox:

    1. Open the Exchange Management Shell, and run the Set-ADUser cmdlet:

      Set-ADUser -Identity <name of affected mailbox> -Add @{msExchArchiveaddress="<domain name of cloud archive>"}
      
    2. Run the Get-Mailbox cmdlet to verify that the ArchiveDomain value is set successfully:

      Get-Mailbox -Identity <name of affected mailbox> | FL *archive*
      
  4. To migrate the on-premises primary mailbox to Exchange Online, use the New-MigrationBatch or the New-MoveRequest cmdlet together with the PrimaryOnly switch.