Microsoft 365

Microsoft 365: How to disable Azure AD Sync (Entra Sync)

Sometimes you may want to disconnect from the Microsoft 365 Cloud.
Whether you’re working in a test environment, planning to switch providers, or simply want to pause synchronization temporarily—there are valid reasons to stop the sync.
Since there’s very little guidance available online, I’ll walk you through how to disable synchronization in this video.
Let’s get started!

All we need to do is install the good old MSOnline module and disable the sync. Here’s the code that makes it happen.

To proceed, you’ll need valid Microsoft 365 credentials and a Windows machine that’s online.

Install-Module MSOnline
Connect-MSolService
Set-MsolDirSyncEnabled -EnableDirSync $false
(Get-MSOLCompanyInformation).DirectorySynchronizationEnabled # just for checking

Hope this was helpful.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.