Exchange Online duplicate mailbox

How to resolve duplicate mailboxes in a Hybrid Exchange scenario?

It often happens that companies set up Office365 and then use it alongside the actual Exchange OnPremise infrastructure. For testing purposes or even partially productive. But when it comes to the hybrid scenario and the migration of the local mailboxes, the nasty surprise awaits. The affected user cannot be migrated because a mailbox already exists in the cloud for the same user. It is even more annoying if there is already data in the cloud mailbox. The only workaround here is usually the .pst export.

Why?

As already mentioned at the beginning, it often happens that companies want to test Office365 thoroughly without “marrying” it to the local infrastructure (ADConnect).
The users created in the cloud are then usually already assigned test licenses. As soon as one of these test licenses also includes the Exchange Online plan, the user also receives an Exchange GUID = mailbox.

Sometimes it also happens that companies want to switch to Office365 and already “prepare” the cloud environment – create users and licensing. This is not wrong, but in connection with ADConnect and a hybrid Exchange scenario too hasty thought. The OnPremises mailbox user has an Exchange GUID and so does the cloud user. If possible, follow these steps if you are considering migrating to the cloud with Exchange in a hybrid scenario:

  1. Create tenant
  2. Install ADConnect
  3. Run Hybrid Configuration Wizzard (HCW)

How to fix the problem with duplicate mailboxes

First, the license of the cloud object must be revoked. To do this, simply deselect “Exchange Online” in the user’s license overview.

This causes the mailbox to be “deleted”. Under certain circumstances, this may take a little time. You can check this by looking in the Exchange Online Admin Center to see if the mailbox is still visible under “User”. If it is not visible, the mailbox is “deleted”. If the license is reassigned within 30 days, the “old” mailbox will be provisioned again. The revocation of the license could have been an accident. With this command you can delete all Exchange Online relevant information on the mailbox – irrevocably! Just connect to the Exchange Online PowerShell and enter the following command:

Set-User -identity <> -PermanentlyClearPreviousMailboxInfo
Code language: HTML, XML (xml)

Now the ADConnect has to sync again and the local Exchange information will be correctly synced to the cloud user. Open PowerShell on the ADConnect server and run a deltasync:

Start-ADSyncSyncCycle -PolicyType Delta

After that you can get a coffee/tea to make sure that everything was synchronized correctly. After you have comfortably sat down at the table with your hot drink, you may now reassign the license you removed earlier 🙂
If you did everything correctly, the user’s mailbox should only be visible in the local Exchange Admin Center.

The Exchange Team also describes the problem again here:
https://techcommunity.microsoft.com/t5/exchange-team-blog/permanently-clear-previous-mailbox-info/ba-p/607619

%d bloggers like this: