Open in the explorer

Automatically log off users after inactive interval

Type
Computer
GPO path
Computer Configuration › Policies › Administrative Templates › Windows App
Supported on
Windows 10 or later
ADMX file
windowsapp.admx
Internal name
windowsapp/WINAPP_AutoLogoff

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
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: 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 1

Disable

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

Revert 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 SilentlyContinue

Options (1)

LabelControlRegistry valueREG typeConstraints / details
Inactivity timeout (minutes):WINAPP_AutoLogoffTimeoutNumeric boxdecimalAutoLogoffTimeIntervalREG_DWORD
Required · Min: 1

Application

Windows App (Microsoft) — November 2026 templates

November 2026 templates from pl4nty/web-admx-tool.