Block all consumer Microsoft account user authentication
Supported on: At least Windows Server 2016, Windows 10 Version 1703
When the GPO stops applying: Windows removes the value (it is under a Policies branch). How cleanup works
| Registry key | HKLM\Software\Policies\Microsoft\MicrosoftAccount |
|---|---|
| Value name | DisableUserAuth |
| Enabled writes | 1 (REG_DWORD) |
| Disabled writes | 0 (REG_DWORD) |
What it does (vendor explanation)
This setting controls whether users can provide Microsoft accounts for authentication for applications or services. If this setting is enabled, all applications and services on the device are prevented from using Microsoft accounts for authentication. This applies both to existing users of a device and new users who may be added. However, any application or service that has already authenticated a user will not be affected by enabling this setting until the authentication cache expires. It is recommended to enable this setting before any user signs in to a device to prevent cached tokens from being present. If this setting is disabled or not configured, applications and services can use Microsoft accounts for authentication. By default, this setting is Disabled. This setting does not affect whether users can sign in to devices by using Microsoft accounts, or the ability for users to provide Microsoft accounts via the browser for authentication with web-based applications.
Group Policy path: Computer Configuration > Administrative Templates > Windows Components > Microsoft account > Block all consumer Microsoft account user authentication
PowerShell equivalent (generated from the template)
New-Item -Path 'HKLM:\Software\Policies\Microsoft\MicrosoftAccount' -Force | Out-Null
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\MicrosoftAccount' -Name 'DisableUserAuth' -Value 1 -PropertyType DWord -ForceGroup Policy or Intune is the supported way to set policies. Writing the same values directly works like a local policy and is removed by nothing: delete the values to return to "Not configured".