How to manage mailboxes in Microsoft 365 after migrating them within a hybrid environment
Problem:
After you have migrated mailboxes within your hybrid environment with CodeTwo migration tools, you are unable to change some of the user settings in Microsoft 365 (Office 365) – both via Windows PowerShell or Exchange admin center in Exchange Online. You receive the following or similar message:
This user is synchronized with your local Active Directory. Some details can be edited only through your local Active Directory.
This problem may occur when you have deleted migrated mailboxes from your on-premises environment or decommissioned on-premises Exchange Server.
Solution:
Assuming that you have followed the steps from this article, before attempting to migrate mailboxes you had to disable the synchronization of the msExchMailboxGuid attribute between on-premises Active Directory users and Microsoft 365 users. However, even without this attribute, Microsoft 365 users are still synced with the local Active Directory and, because of that, they need to be managed through the on-premises Exchange organization.
If you have already deleted the mailboxes from your on-premises environment (or decommissioned the on-premises server), you need to disable directory synchronization to be able to manage migrated mailboxes through Microsoft 365. Follow the steps below to learn how to do so:
- Connect to Entra ID (Azure AD) by running the following commands in Windows PowerShell:
Install-Module MSOnline Connect-MsolService
When prompted, provide your Microsoft 365 global admin credentials. - Disable directory synchronization by using the following cmdlet:
Set-MsolDirSyncEnabled -EnableDirSync $false
Important
The changes can propagate even up to 72 hours, depending on the number of objects being synced. You can view the directory synchronization status by running:
(Get-MSOLCompanyInformation).DirectorySynchronizationEnabled
If the cmdlet returns True, you need to wait longer. If you get False instead, it means that the directory synchronization has been deactivated.
You can also sign in to Microsoft 365 admin center and check the value in the Sync status column for each user (Fig. 1.). If it shows the cloud icon, it means that this user is not synchronized with the local Active Directory anymore.
Fig. 1. Verifying the directory synchronization status in Microsoft 365 admin center.
You should now be able to manage your mailboxes in Microsoft 365 admin center or via Windows PowerShell.
Warning
If you would like to re-activate directory synchronization, be aware that the synchronization settings might not be restored to their previous state. You may want to consult this Microsoft article before doing so.
Related products: | CodeTwo Exchange Migration, CodeTwo Office 365 Migration |
Categories: | Troubleshooting |
Last modified: | March 12, 2024 |
Created: | September 13, 2018 |
ID: | 750 |