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.
Use the Command Prompt as an Administrator.
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).
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).
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.
Verify disassociation from Azure AD/Entra by using the “dsregcmd /status” command. Look for AzureADJoinStatus: Not Joined and DeviceState: Device not provisioned.