If you have been running a hybrid environment with your office licenses running in the cloud but you still have your Exchange server on-premise, you might be looking to migrate your mailboxes to Microsoft 365 Exchange Online.
Note: This guide should not be followed if you’re using Hybrid Exchange to migrate mailboxes.
There are plenty of tools that can help you migrate your user’s mailbox data to Exchange Online. One example could be MigrationWiz, but if you have started using ADsync then you might have “msExchMailboxGUID” turned on in ADsync. This causes Exchange Online to think that you have your mailbox is located on-premise, therefore you won’t be able to use the mailbox in the cloud unless the “msExchMailboxGUID” string is clear from the beginning.
Instructions:
* This is not supported if you have performed a synchronization using DirSync.
* This is supported if you perform a synchronization using AAD Sync or AAD Connect.
Start by stopping the automatic ADSyncScheduler by the following command via PowerShell.
1 |
Set-ADSyncScheduler -SyncCycleEnabled $false |
Run “Synchronization Rules Editor” as administrator.
Find ”In from AD – User Exchange” and click edit.
Here you choose to edit the original sync rule.
Under “Transformations” find the string called ”msExchMailboxGuid” and change the values to the following:
Expression – msExchMailboxGuid – NULL – Apply Once – Update.
Click “SAVE” and run a full synchronisation.
1 |
Start-ADSyncSyncCycle -PolicyType initial |
You can follow the status of the GUID string via the following PowerShell command.
1 2 |
connect-msolservice Get-Mailbox -Identity user@domain.com |fl *guid* |
*** REMEMBER TO CHANGE EVERYTHING BACK AND TURN msExchMailboxGuid OFF IN SYNC SETTINGS ***
Finally, you can re-enable the ADSyncScheduler.
1 |
Set-ADSyncScheduler -SyncCycleEnabled $false |
If you have any questions / feedback or would like to correct me on any of the stuff above.
Please use the comment section or contact me directly using the blue button in the bottom right corner.
Hello Lucas,
I need to keep using AD Sync after I migrate to Exchange Online and decommission the onprem Exchange.
What if I leave msExchMailboxGuid parameter set to null after migrating my mailboxes? What kind of issues do you think I would experience in this scenario?
Thank you,
Hello Fabricio,
You can keep the ADsync running, just keep in mind to remember that “msExchMailboxGuid” should be ticked off from the synchronization service and in the future if you decide to migrate your ADsync installation to a new server.
Another thing you can do is clear out the onprem “msExchMailboxGuid” attribute once you have migrated all mailboxes and decommissioned the Exchange server. This can be done using powershell.
Hi Lucas,
I am in the exact situation that you have described but half way.
My on-prem exchange is migrated to O365 and exchange servers are de-commissioned by my predecessor but he didn’t do the rest including reverting back the changes made to rule 108.
Now I am upgrading this AD connect by setting up a new instance and importing the settings from old AD connect. So I see a warning with 2 rules 109, 108 as shown exactly in this MS article.
https://docs.microsoft.com/en-us/azure/active-directory/hybrid/how-to-connect-fix-default-rules
And realise I am in this situation. Currently my new AD connect is in staging mode and I am confused how to proceed.
I am thinking below options after reading your article:
1) I delete the custom rule 108 that was imported and enable the default rule 109.
2) I keep rule 108, rename it as a custom rule and change precedence between 0 to 99 and then enable the default rule 109.
3) Regarding customizing sync option currently we are only using the hash synchronization option. So as per your recommendation after either option 1 or 2 that I proposed. I have to enable the ‘Azure AD App & Attribute filtering’ option and exclude the ‘msExchMailboxGuid’ attribute also?
Please advise. Thanks in advance.
Hi James,
How did you fix this?
Running in the exact same situation.
Thanks