Lock password protected sections after user hasn't worked on them for a time
Explanation
OneNote supports password protecting sections and they are unlocked once a user types the password and can be locked again by either a timeout period or when you navigate away from the section. This option will lock the section after the user hasn't used the section for the selected amount of time.
Registry
HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\onenote\security- Value name
- not defined in the ADMX
Enable / disable values: not defined in the ADMX (see the options below).
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: onent16/L_Lockpasswordprotectedsectionsafteruserhasntworkedonthemforatime
$k = 'HKCU:\software\policies\microsoft\office\16.0\onenote\security'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# Check to lock sections
# unchecked: 0
Set-ItemProperty -Path $k -Name 'lockidlesections' -Value 1 -Type DWord
# Time interval (minutes) to lock password protected sections
# Possible options:
# 1 = 1
# 5 = 5
# 10 = 10
# 15 = 15
# 30 = 30
# 60 = 60
# 120 = 120
# 240 = 240
# 480 = 480
# 720 = 720
# 1440 = 1440
Set-ItemProperty -Path $k -Name 'passwordtimeout' -Value 10 -Type DWordDisable
# Disable: onent16/L_Lockpasswordprotectedsectionsafteruserhasntworkedonthemforatime
# No value is written in the "Disabled" state (nothing defined in the ADMX)Revert to "Not configured"
# Revert to "Not configured": onent16/L_Lockpasswordprotectedsectionsafteruserhasntworkedonthemforatime
$k = 'HKCU:\software\policies\microsoft\office\16.0\onenote\security'
Remove-ItemProperty -Path $k -Name 'lockidlesections' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'passwordtimeout' -ErrorAction SilentlyContinueOptions (2)
| Label | Control | Registry value | REG type | Constraints / details | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Check to lock sectionsL_Checktolocksections | Check boxboolean | lockidlesections | REG_DWORD | Checked: REG_DWORD = 1Unchecked: REG_DWORD = 0 | ||||||||||||||||||||||||
| Time interval (minutes) to lock password protected sections:L_Timeintervalminutestolockpasswordprotectedsections | Drop-down listenum | passwordtimeout | REG_DWORD | Default choice (UI): #2
|
Application
Microsoft 365 Apps / Office (Microsoft) — November 2026 templates
Official templates downloaded on November 12, 2026.