Are you getting this error in Microsoft 365 Admin center when viewing mail tab of a user? And on-prem Exchange has already been decomissioned? Well, you kinda have to “fake” the migration and clear some user’s attributes:
In AD Users and Computers, make sure Advanced Features are activated (View > Advanced Features). Go to the users OU and double click on the user. Select AttributeEditor and clear the following attributes:
msExchMailboxGuid
msExchRecipientDisplayType
msExchRecipientTypeDetails
Run AD / Entra Sync:
Start-ADSyncSyncCycle -PolicyType Delta
Wait for 15-30min and now the user will get an Exchange Online Mailbox if he has a license.
References:
https://techpress.net/this-users-on-premises-mailbox-hasnt-been-migrated-to-exchange-online/
Reading time: 1 min