You cannot turn off active directory synchronization

PhP59300 76 Reputation points
2021-11-30T12:23:45.747+00:00

I'm unable to disable ADSync. I'm attempting to run the following command on are AD Connect server: Set-MsolDirSyncEnabled -EnableDirsync $False

The returning message states:

Set-MsolDirSyncEnabled : You cannot turn off Active Directory synchronization.
At line:1 char:1

  • Set-MsolDirSyncEnabled -EnableDirsync $False
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • CategoryInfo : OperationStopped: (:) [Set-MsolDirSyncEnabled], MicrosoftOnlineException
  • FullyQualifiedErrorId : Microsoft.Online.Administration.Automation.DirSyncStatusChangeNotAllowedException,Microsoft.Online.Administration.Automation.SetDirSyncEnabled

When i run: Get-MSOLCompanyInformation | select DirectorySynchronizationStatus

i get the follow:

DirectorySynchronizationStatus

                   Enabled

The tenant was created several weeks ago (test lab). I have read several articles that it can take up to 72 hours for ad sync to be enabled or disabled against a tenant. I've been trying to run this command for 6 days now and still get the same error.

Any thoughts or suggestions would be appreciated.

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
20,631 questions
0 comments No comments
{count} votes

1 additional answer

Sort by: Most helpful
  1. PhP59300 76 Reputation points
    2021-11-30T13:28:50.427+00:00

    ok thanks, ill do that now.

    0 comments No comments