This user’s on-premises mailbox hasn’t been migrated to Exchange Online

Issue Description

When a new user is added to the on-premises Active Directory, synced to Entra ID, and assigned a license, you might see an error: “This user’s on-premises mailbox hasn’t been migrated to Exchange Online. The Exchange Online mailbox will be available after migration is completed.

This error indicates a mismatch between on-premises and Exchange Online. To fix it, investigate the synchronization process and ensure the user’s mailbox is correctly configured in both environments.

The Exchange Online mailbox will be available after migration is completed

Solution:

  1. Login on the domain controller and Open Active Directory Users and Computers.
  1. Search for the affected user and double-click on it to manage Users Attributes.
  1. Remove msExchMailboxGuid attribute value from the On Premise Active Directory User.
msExchMailboxGuid
  1. Remove msExchRecipientDisplayType attribute value.
msExchRecipientDisplayType 
  1. Remove msExchRecipientTypeDetails attribute value.
msExchRecipientTypeDetails 
  1. Move the user to an OU in Active Directory which is not getting synced to Azure Active Directory and run Delta Sync.
Start-ADSyncSyncCycle -PolicyType delta
Start-ADSyncSyncCycle -PolicyType delta
  1. After the delta sync is complete, in couple of minutes you will see that the user is now deleted on Microsoft 365 admin center.
  1. Go to Microsoft 365 Admin center -> Users -> Deleted Users. This is the Recycle Bin where you can find the deleted users.
  1. Now, Delete this user from Recycle bin by following below steps:
  • Open Powershell console as administrator
  • Execute following coommands.
Install-module MSOnline
  • Run Connect-MSolService command.
Connect-msolservice
  • Check the users in Deleted Users. Find the userprincipal name of the user you want to permanently remove from M365.
get-msoluser -ReturnDeletedUsers
  • Use below command to delete the user from Recycle bin.
Remove-MsolUser -UserPrincipalName [email protected] -RemoveFromRecycleBin
get-msoluser -ReturnDeletedUsers
Remove-MsolUser -UserPrincipalName testuser@techpress.net -RemoveFromRecycleBin
  1. Now, Move the user back to the OU which is getting synced to M365 and run delta sync again
Start-ADSyncSyncCycle -PolicyType delta
  1. After the delta sync completes. Please check the user on Microsoft 365. Assign a license to the user again to create the mailbox. This time it should create the mailbox successfully.

Leave a Comment

Discover more from TechPress

Subscribe now to keep reading and get access to the full archive.

Continue reading