1. Resources
  2. Detection sources
  3. Event ID 4767

Event ID 4767: A user account was unlocked

Written when a locked-out user account is unlocked: on domain controllers for domain accounts, on member servers and workstations for local accounts. The answer to a lockout (4740): who unlocked the account, and when.

Log source
Windows Security log
Detection value
Context
Volume
Low
Last updated
Audit subcategory
Audit User Account Management (Account Management, Success)
Logged on
All Windows computers
Event versions
0
Detects
Not read by our detection rules yet

When it is written

Windows writes 4767 each time a user account is unlocked. Domain controllers write it for domain accounts, member servers and workstations for their local accounts. Subject is the account that unlocked it and Target Account the account that was unlocked; the event carries nothing else, no address and no reason. Microsoft lists it as a success event only.

The lockout itself is event 4740. How an account leaves the lockout depends on the Account lockout duration policy: with a value of 0 the account stays locked until an administrator unlocks it, otherwise it unlocks on its own once the duration has passed. Microsoft's page for 4767 does not say whether that automatic unlock writes the event, so treat a 4767 as an unlock that an account asked for.

No rule reads 4767 yet. Read it next to the lockout (4740) and the failed sign-ins that caused it (4625, 4771, 4776): an unlock that comes before anyone has looked at where the failures came from lets the same source carry on.

How to turn it on

Advanced audit policy subcategory Audit User Account Management, Success. Set it in a Group Policy object linked to the computers that write the event:

Computer Configuration > Policies > Windows Settings > Security Settings > Advanced Audit Policy Configuration > Audit Policies > Account Management > Audit User Account Management
Microsoft's recommendation per computer role
ComputerAuditNote
Domain controllersSuccess and FailureMicrosoft's general and stronger baselines both recommend Success and Failure auditing. Microsoft calls the subcategory useful for watching critical domain accounts (domain admins, service accounts, database admins) and recommends Failure auditing mainly for invalid password change and reset attempts on domain accounts, failed changes of the DSRM password and failed SID History additions.
Member serversSuccess and FailureBoth baselines recommend Success and Failure auditing. Microsoft recommends watching every change to local user accounts, especially the built-in local Administrator and other critical accounts, and Failure auditing mainly for invalid password change and reset attempts on local accounts.
WorkstationsSuccess and FailureBoth baselines recommend Success and Failure auditing. Microsoft recommends watching every change to local user accounts, especially the built-in local Administrator and other critical accounts, and Failure auditing mainly for invalid password change and reset attempts on local accounts.
Check the current setting
auditpol /get /subcategory:"User Account Management"
Based on vendor documentation.
Turn it on (local policy; a domain GPO overrides it)
auditpol /set /subcategory:"User Account Management" /success:enable
Based on vendor documentation.
The same on a Windows in another display language
auditpol /get /subcategory:"{0CCE9235-69AE-11D9-BED3-505054503030}"
Based on vendor documentation.

Run the commands in an elevated prompt on a computer that writes the event. Subcategory settings take effect only when the security option Audit: Force audit policy subcategory settings (Windows Vista or later) to override audit policy category settings is enabled (the default), and a Group Policy object that sets advanced audit policy replaces local changes at its next refresh. Microsoft's advanced audit policy reference

Fields

In Event Viewer order. The field names are those of the event XML, from the event template that ships with Windows.

FieldWhat it holdsSince
Security IDSubjectUserSidSubjectSID of the account that unlocked it. Event Viewer resolves it to a name when it can.v0
Account NameSubjectUserNameSubjectName of the account that unlocked it.v0
Account DomainSubjectDomainNameSubjectDomain of that account, or the computer name for a local account. NT AUTHORITY for well-known principals such as LOCAL SERVICE.v0
Logon IDSubjectLogonIdSubjectLogon ID of the session that unlocked the account, in hexadecimal. The logon event of that session (4624) on the same computer carries the same value.v0
Security IDTargetSidTarget AccountSID of the account that was unlocked. Event Viewer resolves it to a name when it can. Use it to match the lockout (4740) of the same account.v0
Account NameTargetUserNameTarget AccountName of the account that was unlocked.v0
Account DomainTargetDomainNameTarget AccountDomain of that account, as a NetBIOS or DNS name. For a local account, the name of the computer it belongs to.v0

Values to know

Security ID SubjectUserSid

ValueMeaningSignal
A help desk or administrator accountAn unlock on requestExpected
The Microsoft Entra Connect connector account (MSOL_ prefix in an express installation)An unlock made through self-service password reset with writebackCheck the matching entry in the Entra audit log. Without writeback this account has no reason to unlock accounts.Expected
Any other accountAn unlock by an account outside the expected listFind the right that let it unlock the account, such as write access to the account's lockoutTime attribute, the permission Microsoft's writeback tutorial grants the connector account.Worth knowing

Account Domain TargetDomainName

ValueMeaningSignal
The domain's NetBIOS or DNS nameA domain account was unlockedWritten by the domain controller that handled the unlock.Expected
A computer nameA local account of that computer was unlockedMicrosoft recommends monitoring every 4767 for local accounts.Worth knowing

Volume and noise

Microsoft rates the volume of the subcategory as low, and unlocks follow lockouts: help desk staff and administrators unlocking users who mistyped or forgot a new password. Where Microsoft Entra self-service password reset writes back to Active Directory, Microsoft says a reset also unlocks the account by default and can be set to unlock without a reset, and the connector account holds write access to lockoutTime for that, so expect unlocks made through it.

Keeping it manageable

  • Keep every 4767: the volume is low and each event is an action someone chose to take.
  • As Microsoft recommends, review every 4767 for local accounts: local accounts are rarely locked and unlocked in ordinary operation.
  • Pair each 4767 with the 4740 for the same TargetSid and check that the lockout's Caller Computer Name was looked at before the unlock, especially for privileged and service accounts.
  • Compare SubjectUserSid with the accounts allowed to unlock accounts, the help desk group, the administrators and, where password writeback is used, the Microsoft Entra Connect connector account.

Sample event

Version 0, with made-up values.

<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Microsoft-Windows-Security-Auditing" Guid="{54849625-5478-4994-a5ba-3e3b0328c30d}" />
    <EventID>4767</EventID>
    <Version>0</Version>
    <Level>0</Level>
    <Task>13824</Task>
    <Opcode>0</Opcode>
    <Keywords>0x8020000000000000</Keywords>
    <TimeCreated SystemTime="2026-11-18T09:30:12.4567890Z" />
    <EventRecordID>1048576</EventRecordID>
    <Correlation />
    <Execution ProcessID="712" ThreadID="2408" />
    <Channel>Security</Channel>
    <Computer>DC01.corp.example.com</Computer>
    <Security />
  </System>
  <EventData>
    <Data Name="TargetUserName">bob</Data>
    <Data Name="TargetDomainName">CORP</Data>
    <Data Name="TargetSid">S-1-5-21-1004336348-1177238915-682003330-1121</Data>
    <Data Name="SubjectUserSid">S-1-5-21-1004336348-1177238915-682003330-1112</Data>
    <Data Name="SubjectUserName">hd-carol</Data>
    <Data Name="SubjectDomainName">CORP</Data>
    <Data Name="SubjectLogonId">0x51c2e4</Data>
  </EventData>
</Event>

Attacks this event reveals

No detection rule or detection logic in our library reads this event yet. It is documented here because it sits next to the events they read: it explains them, follows from them or is the trace a defender looks for around them (see Related events).

Frequently asked questions

Does an account that unlocks on its own write 4767?

Microsoft's event page does not say. With an Account lockout duration other than 0 the account unlocks by itself once the duration has passed; with 0 it stays locked until an administrator unlocks it, and that unlock is written as 4767. Do not rely on 4767 to know when an automatically unlocked account became usable again.

How do I find out why an account had to be unlocked?

Look up the 4740 for the same Target Account Security ID: its Caller Computer Name is the computer the failed attempts came from. Then read the failed logons there (4625) and, on the domain controllers, the Kerberos and NTLM failures for the account (4771, 4776).

Should I alert on 4767?

Not on every event. Microsoft recommends monitoring all 4767 events for local accounts. For domain accounts, look at unlocks of privileged and service accounts, and at unlocks made by accounts that are not your help desk, administrators or password writeback connector.

References