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

Disclaimer
This blog post is intended for new deployment scenarios, where no mailboxes exist in Office 365. It is written for an old version of DirSync. Since then newer versions has been released with built in functionality to filter what attributes to sync. Always make sure that you have a valid backup before making any changes to existing environments.

Normally you would use the build-in tools to migrate a mailbox from your on-prem environment to Exchange Online. In some scenarios the built-in tools cannot be used, and then you have to be able to create the cloud mailbox while the on-prem mailbox is still available. The problem is that when you assign a license to the cloud user you get a warning that “The user’s on-premises mailbox hasn’t been migrated” and the new mailbox will not be created.

warning_onprem_mailbox

If you are using DirSync and your on-prem Exchange environment is not published to the internet according to best practice you may consider using third party migration tools instead of the built in tools to move your mailboxes to Office 365. This is one example of a scenario where you would encounter this warning message.

To solve this problem we have to exclude attributes from being synced in DirSync. The solution is very similar to a problem with Lync that we described a while ago, and I will use the same solution here. The idea is to exclude the msExchMailboxGuid attribute from DirSync.

Start the Synchronization Service Manager (miisclient.exe) on the DirSync server. In the “Management agents” pane, select properties on the Active Directory connector.

2014-04-06 22-41-04

In the management agent designer, select “Configure attribute flow” and remove the msExchMailboxGuid for both the User and inetOrgPerson Data Source from the attribute flow as below.

2014-04-06 22-44-06

msExchExchangeGuid

Finally we have to delete the Active Directory Connector Space.

2014-04-06 21-42-25

2014-04-06 22-46-58

2014-04-06 22-47-25

2014-04-06 22-47-48

After the connector space has been deleted, run a Full DirSync again, wait a few minutes and now you will be able to create mailboxes by assigning an Exchange Online license.

Happy provisioning!

/ Andreas

Advertisement

8 thoughts on “Exchange Online: “This user’s on-premises mailbox hasn’t been migrated to Exchange Online”

  1. Oscar Öhrling

    Thanks! saved my weekend. Migrating from SBS2003 to Office 365 with dirsync using CloudMigrator365 and stumbled into this one.

    /Oscar from Techdays 😉

  2. C.C.

    After i did all this and ran a full sync, every user already synced to the cloud was deleted, and DirSync no longer syncs anything. What could possibly went wrong?

    1. Andreas Lindahl Post author

      This sounds very strange, these actions will never have the effect that all users are deleted. I suggest that you restore the users from the recycle bin, and then install the lastest version of Azure AD Sync instead. Azure AD Sync was released after this blog post was written, and has this type of functionality built in. When installing you can select the set of attributes to be synced, and then msExchMailboxGuid can be excluded. This is done on the Optional features page in the setup guide, where Azure AD app and attribute filtering can be selected.

      1. Ash

        This also happened to me – synced users in cloud were deleted and DirSync no longer “exports” any users to the cloud. Using latest DirSync version 1.0.7020.0. Follow with caution!

  3. MrMischief

    Yup…broke everything for me aswell!! Luckily I only have 5 out of 250 mailboxes on Office 365 so far…

    1. Andreas Lindahl Post author

      Thanks for the information. I have added information in the beginning of the blog post to point out in what scenarios this blog post is valid.

  4. Carlos Silva

    Hi, the problem reported that it deletes the users from AzureAD after deleting the connector space and syncing is because you did a DeltaSync and not an InitialSync.

    You should run on powershell the command:
    Start-ADSyncSyncCycle -PolicyType Initial

    1. Andreas Lindahl Post author

      Thanks for pointing this out. It is also mentioned in the blog post.

Comments are closed.