How to Unenroll a PC from Azure Entra/AD/Intune

  1. If you have already deleted the device from Microsoft Entra but still can’t login locally without an Office 365 account, the PC may still be registered with Azure Entra/AD or enrolled in Intune. MAKE SURE YOU ARE LOGGED IN LOCALLY AS .\Administrator OR ANOTHER LOCAL ADMINISTRATOR ACCOUNT.
  2. Use the Command Prompt as an Administrator.
  3. Type “dsregcmd /leave.” This should remove all Azure AD/Entra association, disconnect Intune enrollment, and revert the machine to a workgroup state (local-only logins).
  4. If for some reason dsregcmd /leave fails, try “dsregcmd /unmanage.” This unregisters any device management policies (e.g. from Microsoft Intune or other MDM systems).
  5. If the above commands don’t fully resolve the issue, use the “dsregcmd /reset” command to reset to al Azure AD/Entra enrollment data. Confirm by typing Y when prompted.
  6. Verify disassociation from Azure AD/Entra by using the “dsregcmd /status” command. Look for AzureADJoinStatus: Not Joined and DeviceState: Device not provisioned.
  7. Reboot the PC.
  8. Log in locally to the PC.