Fix pending state issue with Directory synchronization for Microsoft 365, Azure, or Intune
Symptoms
You experience one of the following symptoms in a Microsoft cloud service such as Microsoft 365, Microsoft Azure, or Microsoft Intune:
When you activate directory synchronization in the Microsoft 365 admin center, the page indicates that directory synchronization is enabled. However, when you install the Azure Active Directory Sync tool and run the Configuration Wizard, you receive the following message:
Error 15: DirSync not activated
You then revisit the Directory sync status page to view the directory synchronization status. When you look under 3: Active Directory Synchronization in the center pane, you see the following message:
Active Directory synchronization is being activated
When you deactivate directory synchronization on the Directory sync status page of the Microsoft 365 portal, the page indicates that directory synchronization is enabled.
You then revisit the Directory sync status page to view the directory synchronization status. When you look under 3: Active Directory Synchronization in the center pane, you see the following message:
Active Directory synchronization is being deactivated
Cause
This issue may occur if directory synchronization isn't completely activated or deactivated. It may take up to 72 hours for activation or deactivation to finish.
Note
Azure AD and MSOnline PowerShell modules are deprecated as of March 30, 2024. To learn more, read the deprecation update. After this date, support for these modules are limited to migration assistance to Microsoft Graph PowerShell SDK and security fixes. The deprecated modules will continue to function through March, 30 2025.
We recommend migrating to Microsoft Graph PowerShell to interact with Microsoft Entra ID (formerly Azure AD). For common migration questions, refer to the Migration FAQ. Note: Versions 1.0.x of MSOnline may experience disruption after June 30, 2024.
To determine whether directory synchronization is activated or deactivated, follow these steps by using the Azure Active Directory module for Windows PowerShell:
Select Start, type Azure Active Directory module for Windows PowerShell in the search box, and then select Azure Active Directory module for Windows PowerShell.
Type the following cmdlets in the order in which they are presented. Make sure that you press Enter after you type each cmdlet.
$cred = get-credential
Note
When you're prompted, enter your cloud service admin credentials.
Connect-MSOLService -credential $cred
(Get-MSOLCompanyInformation).DirectorySynchronizationEnabled
Note
This cmdlet returns a value of True or False. If it returns True, directory synchronization is activated. If it is False, directory synchronization is deactivated.
Resolution
Wait until directory synchronization is activated or deactivated. Note the following:
- If you enabled directory synchronization for the first time, activation may require up to 24 hours.
- If you re-enabled directory synchronization, activation may require up to 72 hours. For more information, see Can't manage or remove objects that were synchronized through the Azure Active Directory Sync tool.
- If you disabled directory synchronization, deactivation may require up to 72 hours.
If directory synchronization isn't activated or deactivated after the expected time, follow these steps, and then contact Microsoft Support:
In the same Windows PowerShell console that you used in step 2 of the "Cause" section, type the following cmdlet, and then press Enter:
(Get-MSOLCompanyInformation).DirectorySynchronizationStatus
Note
If the output indicates "PendingEnabled" or "PendingDisabled" after the 24-hour or 72-hour waiting period ends, this is a known issue that affects Exchange Online.
Collect the following information from the Windows PowerShell connection:
Context ID: To collect the context ID, type the following cmdlet, and then press Enter:
(Get-MSOLCompanyInformation).objectID
Service instance: To collect the service instance, type the following cmdlet, and then press Enter:
(Get-MSOLCompanyInformation).AuthorizedServiceInstances
Contact Microsoft Support.
More information
For more information about how to enable directory synchronization in Microsoft 365, Azure, and Intune, see Prepare for directory synchronization to Microsoft 365.
Still need help? Go to Microsoft Community or the Microsoft Entra Forums website.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for