Skip to content
SIEMBench
100% Client-Side Tool • Inputs Never Sent to Our Servers

Event ID 4740

Event ID 4740: Account Locked Out

A user account was locked out

Log source
Security
How to enable it
Account Management > Audit User Account Management (Success)
Category
Account Management
Priority
Medium
Typical volume
Medium
MITRE ATT&CK

What Event ID 4740 means

4740 is logged when an account reaches the lockout threshold. For domain accounts, look on the domain controller that holds the PDC emulator role, since it processes every lockout whichever controller saw the bad passwords.

Its most useful value sits in an unexpected place. The caller computer, which tells you where the wrong passwords came from, is stored in the XML field TargetDomainName, although the rendered message labels it Caller Computer Name. Queries that assume the field holds a domain get nonsense.

Most lockouts are stale passwords. Attack-driven ones look different in aggregate: several unrelated users within minutes, or privileged and service accounts that nobody types by hand. Single accounts that lock again after each unlock point at a device with an old password.

Key fields to inspect

FieldMeaningSuspicious when
TargetUserName Account that was locked. Administrators, service accounts, or many users in the same minutes.
TargetDomainName Caller computer name, despite its label in the XML. Empty or unfamiliar, which is common for attacks through mail or web front ends.
TargetSid Security identifier of the account. RID 500, if administrator lockout is enabled by policy.
SubjectUserName Domain controller that recorded the lockout. Normally a computer account ending in $.
SubjectDomainName Domain of that controller. Not useful for triage.

Detection queries

Find callers that lock several accounts within fifteen minutes. Adjust names and thresholds to your environment. About these queries.

Splunk SPL

index=windows source="XmlWinEventLog:Security" EventCode=4740
| rename TargetDomainName AS caller
| bin _time span=15m
| stats dc(TargetUserName) AS locked values(TargetUserName) AS users BY _time caller
| where locked>=3

Microsoft Sentinel KQL

SecurityEvent
| where EventID == 4740
| extend Caller = TargetDomainName
| summarize Locked = dcount(TargetUserName), Users = make_set(TargetUserName, 50) by Caller, bin(TimeGenerated, 15m)
| where Locked >= 3

PowerShell

Get-WinEvent -FilterHashtable @{ LogName = 'Security'; Id = 4740; StartTime = (Get-Date).AddDays(-2) } |
  ForEach-Object { $d = @{ Time = $_.TimeCreated }; ([xml]$_.ToXml()).Event.EventData.Data | ForEach-Object { $d[$_.Name] = $_.'#text' }; [pscustomobject]$d } |
  Select-Object Time, TargetUserName, TargetDomainName, SubjectUserName | Format-Table -AutoSize

Attack scenarios

Careless password spray

An attacker who misjudges the lockout threshold locks dozens of accounts. The caller is the server whose service was attacked, such as a mail or VPN front end, and its own logs hold the external address.

Brute force on one account

Repeated lockouts of an administrator from one workstation show guessing from inside. Check that host for tools before you assume that the user forgot the password.

Deliberate denial of access

Anyone who can list user names can lock accounts on purpose. Many lockouts with no success anywhere may be disruption or a distraction.

Investigation checklist

  1. Read TargetDomainName to get the caller computer.
  2. On the caller, look for 4625 and 4648 at the same time to find the process or remote address.
  3. If the caller is a mail, VPN or web server, read its logs for the client address.
  4. On domain controllers, gather 4771 (0x18) and 4776 (0xC000006A) for the account.
  5. For repeat lockouts, check scheduled tasks, services, mapped drives and phones.

Common benign causes

Event ID 4740 FAQ

Where do I find the source of an account lockout?

Open 4740 on the PDC emulator and read Caller Computer Name, which is TargetDomainName in the XML. Then examine that computer's 4625 events for the same account and time.

Why is Caller Computer Name blank?

The authentication reached the domain controller without a client name, which happens with some NTLM and non-Windows clients. Use 4776, 4771 and NTLM operational logs to trace the path.

Is event 4740 logged on every domain controller?

It is logged on the controller that processed the lockout and on the PDC emulator, to which bad passwords are forwarded. Querying the PDC emulator is enough in most domains.

Techniques follow MITRE ATT&CK® v20.1. © 2026 The MITRE Corporation. This work is reproduced and distributed with the permission of The MITRE Corporation (license). Field names were checked against Microsoft documentation and provider schemas.