In a project I was running some time ago, one of the main Tasks was to move on-premise Mailboxes to Exchange online. The migration went more or less smooth, but there was one mailbox which I wasn’t able to migrate.

By checking the migration status with Powershell:

Get-MigrationUser -BatchId <BATCH ID> | Get-MigrationUserStatistics

I got the following output:

After connecting to Exchange online portal, I opened the current Job and I got the following error message:

The fix is quiet easy just follow the steps:

Open the Exchange Management Shell from the on-prem server and run the following command to find out what the on-prem Exchange GUID is.

Get-Mailbox <MailboxName> | Format-List ExchangeGUID

Now run the following command from an Exchange Online session.

Get-MailUser -Identity <UserName> | fl displayname,ExchangeGuid

As you can see in my example the Exchange GUID’s are in fact different.

From the Exchange Online session use the following command to manually set the GUID to match the on-prem one.

Set-MailUser -Identity [email protected] -ExchangeGUID xxxxxxxxx-xxxxxxxxxxxxxxxxxxxx

Once this command completes you can use the Get-MailUser command again to check if the changes have been written to Azure AD.