The command Set-User email address removed for privacy reasons -PermanentlyClearPreviousMailboxInfo does not clear the "MailboxLocations" from the EXO.
I had problem when migrating an on prem mailbox to EXO (hybrid). User A was offboarded and disabled on the on-prem. The disabled user A's mailbox is connected to user B. Now, user B has the ExchangeGUID of user A which is correct.
After the delta sync, when I run the migration of user B to EXO I get the below error.
Error: RecipientGuidMismatchPermanentException: Recipient's GUID '00000000-0000-0000-0000-000000000000' does not match the expected value 'xxxxx-xxxx-xxxx-xxxx-xxxxxxxxx'. This issue could occur if mailbox guid 'xxxxx-xxxx-xxxx-xxxx-xxxxxxxxx' is stamped on multiple recipients. Check for the potential mailbox guid conflict, eliminate it and try again.
So to identify which recipient has the same mailbox GUID I ran get-recipient 'xxxxx-xxxx-xxxx-xxxx-xxxxxxxxx' and the result gave me only user B.
But when I run get-user 'xxxxx-xxxx-xxxx-xxxx-xxxxxxxxx' then it showed me both user A (mailuser) and user B (mailuser).
I deleted User A from Azure AD and then started the migration for user B and it went ok.
User A MailboxLocations has a stamp of mailboxGUID 'xxxxx-xxxx-xxxx-xxxx-xxxxxxxxx' which was casuing the conflict.