Table of Contents
Disconnect Windows 10/11 From Azure AD
If you’ve previously joined your Windows 10 to Azure AD and now want to disconnect, this article is for you. You may need to disconnect from Azure AD or your work/school account, if you want to use the device for personal use
While connected to Azure AD, your system settings are governed by your organization. For example, if your organization has restricted to download apps from Microsoft Store, you can revert this, until your disconnect from organization.

Unjoin Windows 10/11 from Azure AD from Windows Settings
1️⃣ Right click on Windows Start Button then select Settings.
2️⃣ In the Settings app, navigate to Accounts option.

3️⃣ Select Access work or school then in right pane, click on your currently connected to Azure AD account and then click Disconnect.

4️⃣ Then you’ll Disconnect from the organization box, after reviewing the information provided, click Disconnect.

5️⃣ Before you disconnect your Windows 10/11 from Azure AD, you need to make sure there exists either a local account or Microsoft account with administrative rights. This is because, you can’t directly switch to local or Microsoft account from an Azure AD account. The only way is disconnected from your Azure AD account.

6️⃣ If your account info provided is correct, you’re asked to make a final restart to disconnect from Azure AD. Simply click on Restart now to finish the process.
After reboot, your system will no longer be connected to your Azure AD account.

And the device will be removed from Azure AD portal automatically.

Disconnect Windows 10/11 from Azure AD using command line
1️⃣ Open Windows PowerShell Admin or Windows Command Prompt as administrator then run the following command to check joining status.
dsregcmd.exe /status
+----------------------------------------------------------------------+
| Device State |
+----------------------------------------------------------------------+
AzureAdJoined : YES
EnterpriseJoined : NO
DomainJoined : NO
Device Name : DESKTOP-9FDRHRJ
2️⃣ To disconnect from Azure AD, run this command dsregcmd /debug /leave.
dsregcmd /debug /leave
DsrCLI: logging initialized.
DsrCmdJoinHelper::Leave: ClientRequestId: 498efb10-a2ad-466a-b2f5-916f1ad9e2c9
Unjoin request ID: 498efb10-a2ad-466a-b2f5-916f1ad9e2c9
Unjoin response time: Sun, 31 Jul 2022 10:26:57 GMT
Unjoin HTTP status: 200
Only the NGC for the current user is being removed. To remove all rerun as SYSTEM.
DSREGCMD_END_STATUS
AzureAdJoined : NO
EnterpriseJoined : NO
3️⃣ Run command dsregcmd /status again to verify it works.
PS C:\Windows\system32> dsregcmd /status
+----------------------------------------------------------------------+
| Device State |
+----------------------------------------------------------------------+
AzureAdJoined : NO
EnterpriseJoined : NO
DomainJoined : NO
Device Name : DESKTOP-9FDRHRJ
Not a reader? Watch this related video tutorial: