Only allow device authentication for the Microsoft Account Sign-In Assistant
Autoriser uniquement l’authentification de l’appareil pour l’Assistant Connexion au compte Microsoft
Explanation
This setting determines whether to only allow enterprise device authentication for the Microsoft Account Sign-in Assistant service (wlidsvc). By default, this setting is disabled and allows both user and device authentication. When the value is set to 1, only allow device authentication, and block user authentication.
Ce paramètre détermine s’il faut autoriser uniquement l’authentification d’appareil d’entreprise pour le service Assistant Connexion au compte Microsoft (wlidsvc). Par défaut, ce paramètre est désactivé et autorise l’authentification de l’utilisateur et de l’appareil. Lorsque la valeur est définie sur 1, autorisez uniquement l’authentification de l’appareil et bloquez l’authentification de l’utilisateur.
Registry
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System- Value name
EnterpriseDeviceAuthOnly
| State | Value written |
|---|---|
| Enabled | REG_DWORD = 1 |
| Disabled | REG_DWORD = 0 |
PowerShell
PowerShell commands that write to the registry what the policy would write. Values in angle brackets (<…>) must be replaced.
Writing directly to the registry bypasses Group Policy: if a GPO manages this value, it will be rewritten at the next gpupdate; otherwise the value stays in place (the "tattooing" effect). Prefer a GPO or, locally, LGPO.exe. Run PowerShell as administrator for HKLM. Some policies need a restart or gpupdate /force.
Enable
# Enable: MSAPolicy/MicrosoftAccount_RestrictToEnterpriseDeviceAuthenticationOnly
$k = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'EnterpriseDeviceAuthOnly' -Value 1 -Type DWordDisable
# Disable: MSAPolicy/MicrosoftAccount_RestrictToEnterpriseDeviceAuthenticationOnly
$k = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'EnterpriseDeviceAuthOnly' -Value 0 -Type DWordRevert to "Not configured"
# Revert to "Not configured": MSAPolicy/MicrosoftAccount_RestrictToEnterpriseDeviceAuthenticationOnly
$k = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System'
Remove-ItemProperty -Path $k -Name 'EnterpriseDeviceAuthOnly' -ErrorAction SilentlyContinue