I can't disable DirSync "You cannot turn off Active Directory Synchronization"

I'm doing some testing in O365. I had DirSync enabled with AD Connect, disabled it to perform a cut-over exchange migration, then enabled it to restore password sync.

I want to change some things on my test environment and do it again, whoever it won't let me disable DirSync. I'm using the same in-cloud global admin account as before, and I'm using the Azure Active Directory Module for Windows Powershell console and I get the return I've pasted below. 

Any ideas?

PS C:\> Connect-MsolService -Credential $Credential
PS C:\> Set-MsolDirSyncEnabled -EnableDirSync $false

Continue with this operation?
[Y] Yes  [N] No  [S] Suspend  [?] Help (default is "Y"):
Set-MsolDirSyncEnabled : You cannot turn off Active Directory synchronization.
At line:1 char:1
+ Set-MsolDirSyncEnabled -EnableDirSync $false
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (:) [Set-MsolDirSyncEnabled],
    + FullyQualifiedErrorId : Microsoft.Online.Administration.Automation.DirSy

PS C:\>


This issue seems to have resolved itself. I set the AD Connect client on my on-prem server to staging mode, and after I couldn't disable Dir Sync, I left it alone. I tried it again this morning about 15 hours since I placed AD Connect in staging and it still failed. I tried it again at about 16 hours since disabling and it worked.  

I know that MS documentation says it can take up to 72 hours for changes to be reflected, but does that also mean it can take that long before you can change the status? Is there any way to force the AD Connect to complete whatever it is it had to do?

1 person found this reply helpful


Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.


Question Info

Last updated June 15, 2021 Views 9,028 Applies to: