
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.
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
- Devices: any PCs still hybrid joined, or apps, file servers and printers relying on AD? Move them to Entra join and Intune first. Read Entra join or hybrid join.
- Sign-in: using pass-through authentication or federation (AD FS)? Switch to password hash synchronization and convert your domains to managed first, so users keep signing in with their current password.
- Passwords: get Self-Service Password Reset ready. After the switch, users only change their password in the cloud.
- Exchange hybrid: plan the end of on-premises Exchange management. Afterwards you manage mailboxes and addresses in Exchange Online.
- Role: you need an account with at least the Hybrid Identity Administrator role.
- Documentation: write down your current configuration, filters and any attribute rules. That information is gone once Entra Connect is uninstalled.
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.
- Run one last sync so the cloud has the most recent data.
- Uninstall Microsoft Entra Connect from the server via Programs and Features in Control Panel (or Apps > Installed apps, depending on your Windows Server version).
- Then turn off sync in the tenant as described below.
Turn off synchronization with PowerShell
- Install the Microsoft Graph PowerShell module if you don't have it yet.
Install-Module Microsoft.Graph -Scope CurrentUser - Connect with the right permissions:
Connect-MgGraph -Scopes "Organization.ReadWrite.All","Directory.ReadWrite.All" - Check the current status and get your organization ID:
Get-MgOrganization | Select OnPremisesSyncEnabled $orgId = (Get-MgOrganization).Id - Turn off sync:
Update-MgOrganization -OrganizationId $orgId -BodyParameter @{onPremisesSyncEnabled = $false} - Check again with
Get-MgOrganization | Select OnPremisesSyncEnabled.

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?
- Users and groups no longer show as synced and are fully editable in the Microsoft 365 admin center and the Entra admin center.
- On-premises attributes such as OnPremisesSamAccountName, OnPremisesDistinguishedName, OnPremisesUserPrincipalName, NetBiosName and DnsDomainName are cleared.
- Users keep their last synced password, if password hash sync was active.
- Update details like department, job title and phone in the cloud from now on, as described in manage users and groups in Microsoft Entra ID.
Checklist after the switch
- Used Seamless SSO? Delete the
AZUREADSSOACCcomputer account from AD. Background in enable Seamless Single Sign-On. - Remove the sync service account in Entra ID and in AD.
- Update your onboarding process: new accounts are now created in the cloud.
- Test sign-in, password change and MFA with a few users.
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