Ran into the following error while attempting to offboard a mailbox (migrate it back on prem from Exchange Online):
MigrationPermanentException: Cannot find a recipient that has mailbox GUID ‘xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx’
This error is usually caused when a mailbox is created directly in the cloud (New – Office 365 Mailbox in Exchange console on prem). The Exchange mailbox GUID doesn’t actually get written back on-prem in this case, so trying to offboard a user results in this error. You can confirm this by connecting to your Exchange Shell on premises and do a Get-RemoteMailbox username | FL ExchangeGUID.
To fix this problem, connect to Exchange Online and find the GUID that’s missing:
Then simply take that GUID and write it back to your on prem remote mailbox object:
Force a DirSync, and all is well with the world!