Automatically log off users after inactive interval
Explanation
Automatically signs out of the Windows App after a period of inactivity. This does not sign the user out of any remote session.
If you enable this policy, specify the inactivity timeout in minutes. After the specified time of inactivity, the Windows App will automatically sign out.
If you disable or do not configure this policy, the Windows App will remain signed in regardless of inactivity.
Registry
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\WindowsApp- Value name
AutoLogoffEnable
| 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: windowsapp/WINAPP_AutoLogoff
$k = 'HKLM:\SOFTWARE\Policies\WindowsApp'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'AutoLogoffEnable' -Value 1 -Type DWord
# Inactivity timeout (minutes)
Set-ItemProperty -Path $k -Name 'AutoLogoffTimeInterval' -Value 1 -Type DWord # minimum 1Disable
# Disable: windowsapp/WINAPP_AutoLogoff
$k = 'HKLM:\SOFTWARE\Policies\WindowsApp'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'AutoLogoffEnable' -Value 0 -Type DWordRevert to "Not configured"
# Revert to "Not configured": windowsapp/WINAPP_AutoLogoff
$k = 'HKLM:\SOFTWARE\Policies\WindowsApp'
Remove-ItemProperty -Path $k -Name 'AutoLogoffEnable' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'AutoLogoffTimeInterval' -ErrorAction SilentlyContinueOptions (1)
| Label | Control | Registry value | REG type | Constraints / details |
|---|---|---|---|---|
| Inactivity timeout (minutes):WINAPP_AutoLogoffTimeout | Numeric boxdecimal | AutoLogoffTimeInterval | REG_DWORD | Required · Min: 1 |
Application
Windows App (Microsoft) — November 2026 templates
November 2026 templates from pl4nty/web-admx-tool.