Can't turn off Azure AD Sync with on-premises AD

Mateusz Kubiś 1 Reputation point
2021-11-23T14:18:14.87+00:00

I try to turn off Azure AD Sync with on-premises AD. I am using "set-msoldirsyncenabled -EnableDirSync $false" powershell command but i have "You cannot turn off Active Directory synchronization" error. I am witing over 72h, currently few days. I was trying refresh domain catalogs, forcing syncing. Everything works good. What more can i do?

Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
6,888 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
23,260 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Vasil Michev 113.8K Reputation points MVP
    2021-11-23T17:57:55.56+00:00

    Share the full error message, as you will be getting a similar error if the cmdlet was run successfully. Also share the output of:

    Get-MSOLCompanyInformation | select DirectorySynchronizationStatus
    

  2. Limitless Technology 39,811 Reputation points
    2021-11-23T19:56:02.107+00:00

    Hello @Mateusz Kubiś

    In order to avoid waiting for 24-72 hours as per “https://learn.microsoft.com/en-us/office365/troubleshoot/active-directory/pending-state-issue-with-directory-synchronization?WT.mc_id=365AdminCSH_SupportCentral”, run the following command on your sync source server:

    Start-ADSyncSyncCycle -PolicyType Delta  
    

    The following command kept returning “PendingDisabled”

    (Get-MSOLCompanyInformation).DirectorySynchronizationStatus  
    

    After the delta sync, it should return to “Disabled”.

    For more information:

    Fix pending state issue with Directory synchronization for Microsoft 365, Azure, or Intune
    https://learn.microsoft.com/en-US/office365/troubleshoot/active-directory/pending-state-issue-with-directory-synchronization

    Hope this helps with your query!

    ------
    --If the reply is helpful, please Upvote and Accept as answer--


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.