# Azure/Office 365 - Convert from ADConnect to Online Only When you are ready to turn off DirSync, and all exchange mailboxes are in the cloud, the next steps will be turning off DirSync: [https://docs.microsoft.com/en-us/microsoft-365/enterprise/turn-off-directory-synchronization?view=o365-worldwide](https://docs.microsoft.com/en-us/microsoft-365/enterprise/turn-off-directory-synchronization?view=o365-worldwide) You need to connect to MSOL with your global admin credentials: connect-msolservice Set-MsolDirSyncEnabled -EnableDirSync $false Next, you can uninstall AD Connect cleanly: [https://docs.microsoft.com/en-us/azure/active-directory/hybrid/how-to-connect-uninstall](https://docs.microsoft.com/en-us/azure/active-directory/hybrid/how-to-connect-uninstall) Please let me know if you have any additional questions or if you wish to archive your case for now? Thank you and have a great day. This will switch AAD\_AD sync accounts to cloud ONLY accounts. If sync runs after this it will create duplicate accounts.