ISSUE: You must specify the PrimaryOnly parameter.

Last modified:


Overview

During mailbox migration you may get following error if the Onprem user has also Archive Mailbox enabled:

Execute_HYBRID_MoveMailboxToO365: An error occurred during Exchange Online Powershell | Ex2E1326|
Microsoft.Exchange.MailboxReplicationService.MailboxReplicationPermanentException|
You must specify the PrimaryOnly parameter. Target user 'UserName' already has an archive mailbox. |

Image 261

Cause

Most likely error is cause because user have Online archive but also Onprem Archive mailbox when still being Onprem exchange mailbox.


Solution

1. Manually migrate only primary mailbox using "PrimaryOnly" parameter in the move request.

New-MoveRequest -Identity <mailbox ID> -RemoteCredential (Get-Credential) -Remote -RemoteHostName <on-premises MRS proxy URL> -BatchName <name of batch> -PrimaryOnly -TargetDeliveryDomain <mail.onmicrosoft.com domain>

NOTE: this does not mean that the Archive mailbox online will be correctly accessible for user.

OR

2. Involve Microsoft in troubleshooting on why the mailbox cannot be migrated.


Is this article helpful for you?