You can disable synchronization from the service side by running:
Set-MsolDirSyncEnabled -EnableDirSync $false
If you want to make any further changes, it's best to spin up another instance of Azure AD connect and rerun the config wizard.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I have been messing around with adding a local server but was running the Server 2019 with a VM that has died. It has SSO setup through azure and wish to delete it as i get emails every day about failed syncs. Thanks for any help.
You can disable synchronization from the service side by running:
Set-MsolDirSyncEnabled -EnableDirSync $false
If you want to make any further changes, it's best to spin up another instance of Azure AD connect and rerun the config wizard.
If you've lost access to your Azure AD Connect server (for example, due to a failed VM), you can disable directory synchronization directly from the cloud using Microsoft Graph PowerShell — no need for the deprecated MSOnline module.
Here’s the PowerShell sequence I successfully used in July 2025 on a production tenant:
Install-Module Microsoft.Graph -Scope CurrentUser -Force;
Connect-MgGraph -Scopes "Organization.ReadWrite.All";
$org = Get-MgOrganization;
Update-MgOrganization -OrganizationId $org.Id -OnPremisesSyncEnabled $false;
Get-MgOrganization | Select-Object OnPremisesSyncEnabled; # --> $null
OnPremisesSyncEnabled = $null
confirms the sync flag has been cleared.
It may take up to 72 hours for the change to fully propagate and for all objects to switch to "cloud-only" status. No need to install the beta module — this worked using the stable Microsoft.Graph release.
. . . . . .