Turning off directory synchronization

Your organisation no longer needs on-premises Active Directory and works entirely in the cloud. Then you can turn off directory synchronization and remove Microsoft Entra Connect (formerly Azure AD Connect). All synced users, groups and contacts become cloud objects that you manage directly in Microsoft 365 and Entra ID. This article shows how to do it safely, in which order, and what to watch for.

Updated on 22 October 2026. Expanded with the order Microsoft recommends, the required role and permissions, the Microsoft Graph PowerShell commands, what happens to your objects, the 72-hour rule and a checklist for afterwards.

When should you do this?

Only turn off sync when you're really retiring on-premises AD. It's not a fix for sync problems, and Microsoft explicitly advises against using it that way. If sync is throwing errors, find the cause first, for example by starting a sync manually and reading the error details.

Before you start

The right order

If you're stopping sync for good, Microsoft recommends uninstalling the sync client first (Entra Connect Sync or Cloud Sync) and only then turning off directory synchronization in the tenant. Do it the other way round and the Entra admin center can show an odd status, such as sync disabled while password hash sync still shows as enabled. That's harmless, but confusing.

  1. Run one last sync so the cloud has the most recent data.
  2. Uninstall Microsoft Entra Connect from the server via Programs and Features in Control Panel (or Apps > Installed apps, depending on your Windows Server version).
  3. Then turn off sync in the tenant as described below.

Turn off synchronization with PowerShell

  1. Install the Microsoft Graph PowerShell module if you don't have it yet.
    Install-Module Microsoft.Graph -Scope CurrentUser
  2. Connect with the right permissions:
    Connect-MgGraph -Scopes "Organization.ReadWrite.All","Directory.ReadWrite.All"
  3. Check the current status and get your organization ID:
    Get-MgOrganization | Select OnPremisesSyncEnabled
    $orgId = (Get-MgOrganization).Id
  4. Turn off sync:
    Update-MgOrganization -OrganizationId $orgId -BodyParameter @{onPremisesSyncEnabled = $false}
  5. Check again with Get-MgOrganization | Select OnPremisesSyncEnabled.
Turning off directory synchronization in Microsoft 365

Converting all objects happens in the background and can take a while in large tenants. Old scripts with Set-MsolDirSyncEnabled no longer work: the MSOnline module is retired.

What changes?

Checklist after the switch

Sync again later?

It's possible, but only 72 hours after turning it off. You'd then need to re-link the AD objects to the cloud objects (soft match on email address or hard match on ImmutableId). That's error-prone, so decide carefully before taking the step. A fresh install starts at install and configure Microsoft Entra Connect.

FAQ

Can I do this in the admin center?

No, turning off directory synchronization is done with PowerShell.

Do users lose their mailbox or OneDrive?

No. Only the source of the data changes. Mailboxes, files, licenses and group memberships stay.

Nederlandstalige versie: Entra Connect uitschakelen en overstappen naar cloud-only


Related articles