This User’s On-premises Mailbox Hasn’t Been Migrated To Exchange Online In Microsoft Office 365 – New Office 365 Tenant


We get the following message after assigning the license to a synchronized user in new Office 365 Tenant and it gets stuck there. This can happen when migrating from on-premise Exchange to newly created Office 365 and we use AD Connect to sync AD accounts to office 365. This can happen due to some on-premise Exchange attributes on the AD account which needs to be cleared.


It is recommended to do this per user rather than for all users in order to avoid clearing attributes for any user who is synchronizing properly.

  1. Log on to the Domain server and execute the following command to clear old exchange attributes.

Set-ADuser “username” -clear homeMDB,homeMTA,msExchMailboxGuid,msexchhomeservername,legacyexchangedn,msexchmailboxsecuritydescriptor,msexchpoliciesincluded,msexchrecipientdisplaytype,msexchrecipienttypedetails,msexchumdtmfmap,msexchuseraccountcontrol,msexchversion,msExchMobileMailboxFlags,msExchRBACPolicyLink,msExchTextMessagingState,msExchUserCulture,msExchWhenMailboxCreated,mDBUseDefaults,showInAddressBook,mS-DS-ConsistencyGuid,msExchBypassAudit,msExchMailboxAuditEnable,msExchMailboxAuditLogAgeLimit

2. Connect to Exchange Online PowerShell of the Tenant and remove the synchronized user from Office 365 and then also from recycle bin using the following commands.

Remove-MsolUser -UserPrincipalName -force

Remove-MsolUser -UserPrincipalName -force -RemoveFromRecycleBin

3. Check on Office 365 Portal or using PowerShell to confirm user does not exist anymore and also the in recycle bin.

get-msoluser | sort userprincipalname

4. Run AD Sync. Start ADSyncSyncCycle -PolicyType Delta

5. Check on Office 365 portal or using PowerShell to confirm that user is there now.

6. Assign the license to the user and it should pop back up as a user mailbox now.

Please Note: Always run the PowerShell commands with –Whatif switch to see what is it going to change prior to executing the command.

There was a related case where the the client had an existing Office 365 Tenant and they were getting the above error. In that case, following is what fixed the issue.

Migrating On-Prem Users To Existing O365 Tenant With AD Connect Sync Already In Place

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Create a website or blog at

Up ↑

%d bloggers like this: