Open in the explorer

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

Type
Computer
GPO path
Computer Configuration › Policies › Administrative Templates › Windows Components › Microsoft account FR: Configuration ordinateur › Stratégies › Modèles d'administration › Composants Windows › Compte Microsoft
Supported on
At least Windows 11 Version 22H2 FR: Au moins Windows 11 version 22H2
ADMX file
MSAPolicy.admx
Internal name
MSAPolicy/MicrosoftAccount_RestrictToEnterpriseDeviceAuthenticationOnly

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.

French text from Windows 11 26H2

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
StateValue written
EnabledREG_DWORD = 1
DisabledREG_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 DWord

Disable

# 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 DWord

Revert 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

Availability

Windows 10

— 22H2— 21H2— 21H1— 20H2— 2004— 1909— 1903— 1809— 1803— 1709— 1703— 1607— 1511— 1507

Windows Server

✓ 2025— 2022— 2016