I'm setting up several Windows machines that are joined to a Microsoft Entra tenant and need them to sign in automatically. I've tried scripts and manually editing the Windows autologon registry values, but I'm unsure what to use for the default domain name. I've tested a period, the computer name, and "AzureAD," but none worked. The settings also disappear or revert after every reboot, even though the same approach remains in place on traditional domain-joined machines. Manual sign-in with the user account works successfully. I'm also unable to configure the Sysinternals Autologon utility because it reports that the credentials are invalid. What username and domain format should be used, and what could be causing the registry settings to be reset?
1 Answer
For an Entra-only device, try the username in the form .\username and use the computer’s local hostname as DefaultDomainName. Some setups also work with the Entra tenant value as the domain, but the important part is confirming the exact format by signing in manually first. The Microsoft 365 account must already be able to log on interactively on that machine.

The account signs in manually without any problem. The confusing part is that the autologon registry values are reset after every restart.