Skip to main content
4740SecurityAccount ManagementSecurity tier 1

Event ID 4740: A user account was locked out

Event ID 4740 fires in the Security log when a user account gets locked out after exceeding the domain's bad-password threshold. Windows itself (SYSTEM) performs the lockout, so the event names the locked account, not an attacker. The CallerComputerName field is the pivot: it names the machine that generated the failed attempts.

What Triggers Event 4740

Event 4740 belongs to the Audit User Account Management subcategory inside the Account Management audit category, and it fires exactly once per lockout, the moment a user's bad-password count crosses the domain's Account Lockout Threshold policy. It is not a per-attempt event.

If a policy locks an account after ten failures, you get nine failed-logon events and then a single 4740 when the tenth attempt trips the counter. That single-fire behavior matters for triage: a 4740 tells you a threshold was crossed, not how many attempts preceded it or what password was tried.

The Subject fields (SubjectUserSid, SubjectUserName, SubjectDomainName, SubjectLogonId) describe who performed the lockout operation, and in the overwhelming majority of cases that subject is SYSTEM, not a person or an attacker account. Microsoft's own monitoring guidance calls this out directly: report the event whenever Subject\Security ID is not SYSTEM, because a non-SYSTEM subject means someone (or some script) locked the account deliberately rather than Windows enforcing policy. Don't mistake the Subject fields for the attacker; they almost never are.

The field analysts actually chase is CallerComputerName, under Additional Information. It names the computer account from which the logon attempts that triggered the lockout were received, for example a workstation hostname, a jump box, or a server running a scheduled task under a stale credential. This is the only field in 4740 that points outward, toward where the failed authentication actually originated, which is why every triage runbook for this event starts and ends with it.

Where the event actually lands is the detail most SOC onboarding projects get wrong. Microsoft's documentation states that for user accounts this event generates on domain controllers, member servers, and workstations, but that phrasing hides an important split: local account lockouts are logged locally, on whichever member server or workstation owns the account, while domain account lockouts are logged on domain controllers, and specifically most reliably on the DC holding the PDC emulator FSMO role.

Netlogon replication forwards bad-password-count updates to the PDC emulator so lockout state stays consistent across DCs, and that DC is where the authoritative 4740 for a domain account tends to surface, even though the event is not itself replicated between domain controllers the way most AD data is.

If your onboarding scope covers member servers and workstations but skips the domain controllers, or worse, only forwards logs from a subset of DCs and never the PDC emulator, you will miss domain-account lockouts almost entirely in your SIEM. This is a common, quiet gap: teams onboard the servers people actually log into and treat domain controllers as infrastructure noise, then wonder why 4740 volume looks suspiciously low for an organization with thousands of domain accounts.

A realistic SOC scenario: Monday morning after a mandated password rotation, helpdesk tickets spike alongside a wave of 4740 events, each with a different TargetUserName but many sharing the same CallerComputerName values belonging to ordinary end-user laptops. That is expiry-driven noise.

Contrast that with an RDP-facing jump box where a single privileged account gets locked out three times in an hour with CallerComputerName pointing at an unfamiliar host outside the asset inventory. Same event ID, very different story.

4740 has close neighbors that carry information it does not. Event 4625 (an account failed to log on) fires on every failed attempt, not just the one that trips the lockout, and carries a Status/SubStatus failure code (0xC000006A for bad password, 0xC0000234 once the account is already locked) plus a LogonType that tells you whether the attempt was interactive, network, RDP, or a service logon.

Event 4771 (Kerberos pre-authentication failed) is the domain-controller-side equivalent for Kerberos logons and carries its own failure code table. Event 4776 covers NTLM credential validation failures, common when legacy protocols or non-Kerberos-aware applications are involved.

None of these three tell you a lockout actually happened; 4740 is the only event that confirms the account crossed the threshold. Pair them and you get the full story: the attempts (4625/4771/4776) plus the consequence (4740). After the lockout resolves, event 4767 records who unlocked the account and when, closing the loop for incident timelines.

What lights 4740 up when it's actually an attacker: password spraying tools that cycle through many usernames from one source in a short window, deliberately hammering a known privileged or service account to force a fallback authentication path or an emergency helpdesk reset, and credential-stuffing runs where reused leaked passwords happen to match enough real accounts that lockouts become a side effect rather than the goal.

Event 4740 Fields

FieldWhat it tells youSimulated value
TargetUserNameThe account name that was locked out.j.smith
TargetDomainNameThe domain or computer the locked-out account belongs to.corp.socsimulator.example
TargetSidThe immutable SID of the locked-out account, useful when a username has changed or been reused.S-1-5-21-424242-763122
SubjectUserSidSID of the account that performed the lockout operation, almost always SYSTEM.S-1-5-21-424242-458305
SubjectUserNameName of the account that performed the lockout, almost always the domain controller's machine account.a.chen
SubjectDomainNameDomain of the subject account performing the lockout.corp.socsimulator.example
SubjectLogonIdLogon session identifier that lets you correlate this event back to a 4624 logon session.simulated-subjectlogonid-D4035A
CallerComputerNameThe computer the failed logon attempts originated from; the primary pivot field for finding the true source of a lockout.WS-SIM-275

Inspect Event 4740 Values

Click a field to inspect the full simulated value, the way you would expand it in a SIEM event view.

Example Event 4740 Log

A representative Security entry for Event 4740, generated deterministically by our telemetry engine so every field holds a realistic, internally consistent value.

Simulated example generated by SOCSimulator Research
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Microsoft-Windows-Security-Auditing" />
    <EventID>4740</EventID>
    <Version>0</Version>
    <Level>0</Level>
    <Task>0</Task>
    <Opcode>0</Opcode>
    <Keywords>0x8020000000000000</Keywords>
    <TimeCreated SystemTime="2025-03-10T04:58:17.000Z" />
    <EventRecordID>285513</EventRecordID>
    <Channel>Security</Channel>
    <Computer>WS-SIM-001.corp.socsimulator.example</Computer>
    <Security />
  </System>
  <EventData>
    <Data Name="TargetUserName">j.smith</Data>
    <Data Name="TargetDomainName">corp.socsimulator.example</Data>
    <Data Name="TargetSid">S-1-5-21-424242-763122</Data>
    <Data Name="SubjectUserSid">S-1-5-21-424242-458305</Data>
    <Data Name="SubjectUserName">a.chen</Data>
    <Data Name="SubjectDomainName">corp.socsimulator.example</Data>
    <Data Name="SubjectLogonId">simulated-subjectlogonid-D4035A</Data>
    <Data Name="CallerComputerName">WS-SIM-275</Data>
  </EventData>
</Event>

Detecting Event 4740

Multiple accounts locked out from one caller computer (password spray)

Lucene is the base filter, aggregate distinct TargetUserName count by CallerComputerName in your SIEM).

index=wineventlog EventCode=4740
| bucket _time span=15m
| stats dc(Account_Name) as locked_accounts values(Account_Name) as accounts by _time, Caller_Computer_Name
| where locked_accounts >= 5
| sort - locked_accounts

Repeated lockouts of a privileged or service account

Lucene is the base filter; aggregate lockout count by TargetUserName in your SIEM.

index=wineventlog EventCode=4740
| lookup privileged_accounts.csv Account_Name OUTPUT is_privileged
| where is_privileged="true"
| stats count as lockout_count values(Caller_Computer_Name) as callers by Account_Name
| where lockout_count >= 2

Lockouts caused by a server-class caller instead of an end-user workstation

index=wineventlog EventCode=4740
| lookup server_assets.csv hostname AS Caller_Computer_Name OUTPUT asset_type
| where asset_type="server"
| table _time, Account_Name, Caller_Computer_Name, asset_type

Correlating a 4740 lockout back to the preceding 4625 or 4771 failures

Lucene is the base filter; sequence failures to lockout in your SIEM.

index=wineventlog (EventCode=4740 OR EventCode=4625 OR EventCode=4771)
| transaction Account_Name maxspan=10m startswith=(EventCode=4625 OR EventCode=4771) endswith=(EventCode=4740)
| table _time, Account_Name, Caller_Computer_Name, Status, Sub_Status

True Positive vs False Positive

Most 4740 volume in a healthy environment is benign, and the benign patterns repeat daily. Cached credentials on a phone, tablet, or unattended laptop retry an old password against Wi-Fi, VPN, or Exchange ActiveSync every few minutes after a rotation, generating a slow drip of lockouts for the same account from the same device long after the user has moved on with the new password.

Scheduled tasks and Windows services configured to run under a domain account will do the same thing at fixed intervals once that account's password changes and nobody updated the service's stored credential, producing lockouts with suspiciously regular timing and a CallerComputerName that is a server, not a workstation.

Mapped network drives, mobile mail profiles, and third-party apps that cache credentials locally are the other repeat offenders. All of these share a signature: one account, one or a small handful of known devices, and a pattern that traces cleanly back to a password change or app misconfiguration once you pull the preceding 4625/4771/4776 events for the same TargetUserName and time window.

The malicious signature looks different in shape, not just volume. Many distinct TargetUserName values locked out within a short window, all pointing back to the same CallerComputerName, is the classic spray footprint, one source hammering a list of usernames rather than one username being guessed repeatedly.

Repeated lockouts of a single privileged or service account from a CallerComputerName that has never authenticated as that account before is worth escalating even if the volume is low, because attackers often only need a handful of attempts against a high-value target before pivoting elsewhere or giving up on brute force in favor of another technique.

Lockouts whose CallerComputerName resolves to a server rather than an end-user workstation deserve extra scrutiny too; legitimate interactive logon failures overwhelmingly originate from workstations, so a server-origin lockout often means an automated process, a compromised service account, or lateral movement staging.

The field that breaks this triage the most is CallerComputerName arriving empty. That happens most often when the failed attempts came in over NTLM or through a path where the domain controller never captured the originating hostname, or when cached credentials are involved and the source never resolves cleanly.

An empty CallerComputerName is not itself suspicious, but it does mean you cannot stop at 4740; you have to pull 4625, 4771, or 4776 events for the same account and timestamp to recover IP address, logon type, and failure code before you can call the lockout benign.

Analysts who skip that correlation step and close every 4740 as noise are the ones who miss the spray hiding inside a busy Monday morning.

MITRE ATT&CK® Techniques

Event 4740 telemetry feeds detections for these ATT&CK® techniques:

Practice Investigating Event 4740

Reading about a user account was locked out is one thing. Working the detection inside a live console is another. These free SOCSimulator operations cover the attack techniques Event 4740 helps you detect:

Start investigating free

Frequently Asked Questions

Why is CallerComputerName blank in event 4740?
It usually happens when the failed logon attempts used NTLM instead of Kerberos, or when the authentication path never resolved a hostname back to the domain controller, which is common with cached credentials or non-domain-joined sources. A blank field means you need to pull the preceding 4625, 4771, or 4776 events for the same account and time window to recover the source before ruling the lockout benign.
Which domain controller logs event 4740?
Event 4740 is not replicated between domain controllers, so for domain accounts it most reliably lands on the DC holding the PDC emulator FSMO role, since Netlogon forwards bad-password-count updates there to keep lockout state consistent. If your SIEM only onboards member servers and workstations, or skips the PDC emulator specifically, domain account lockouts can go completely unlogged.
How do I find the source of an account lockout?
Start with the CallerComputerName field in 4740, then correlate the timestamp and TargetUserName against 4625 (failed logon), 4771 (Kerberos pre-auth failure), or 4776 (NTLM validation failure) on the same domain controller or the source machine. Those neighboring events carry the failure code and logon type that 4740 itself does not include.
What causes event ID 4740 besides an attack?
Stale cached credentials on a phone or laptop after a password change, scheduled tasks or services still running under an old service-account password, and mapped drives or mail profiles that keep retrying an outdated password are the most common benign causes. These typically repeat on a regular interval from the same one or two devices.

Sources

Field descriptions, subcategory, event XML schema, and Microsoft's security monitoring recommendations for event 4740.

Community field notes on CallerComputerName and Logon ID correlation back to 4624.

PDC emulator logging behavior, non-replication of 4740, and CallerComputerName as the pivot to 4625 correlation.

Microsoft Sentinel's SecurityEvent table documents WorkstationName as the machine name from which a logon attempt was performed, the closest ingested column to 4740's CallerComputerName field (not a declared 1:1 mapping).

Glossary

What is Persistence? SOC Glossary

Persistence is the set of techniques an adversary uses to keep access to a compromised system after whatever gave them t…

Read more
Glossary

What is Least Privilege? SOC Glossary

The principle of least privilege states that users, processes, and systems should hold only the minimum access rights re…

Read more
Glossary

What is SIEM? SOC Glossary

Security Information and Event Management (SIEM) is a platform that aggregates, normalizes, and correlates log data from…

Read more
Career Path

SOC Analyst (Tier 1) Career Guide: Salary & Skills

Tier 1 SOC Analysts are the front line. You monitor alert queues, triage incoming detections, classify them as true or f…

Read more
Career Path

Incident Responder Career Guide: Salary & Skills

Incident Responders lead the technical response when confirmed breaches happen. You coordinate containment, run forensic…

Read more
Technique

Brute Force (T1110): Detection Training

Brute Force covers any guess-driven path to credentials: classic password guessing, password spraying a few common passw…

Read more
Comparison

SOCSimulator vs. LetsDefend: Platform Comparison

SOCSimulator wins on operational realism. You get multi-tool shift simulation with SLA pressure, noise injection, and al…

Read more
Event ID

Windows Event ID Library: SOC Reference

Windows Security and Sysmon event IDs with simulated log samples, field tables, and tested detection queries.

Read more
Feature

Shift Mode: Real-Time SOC Simulation

Practice alert triage under realistic time pressure with SLA timers and noise injection.

Read more
Feature

Operations: Guided Training Operations

Structured CTF-style investigation operations covering real-world attack scenarios.

Read more
Blog

SOCSimulator Blog: Security Training Insights

Articles on SOC analyst skills, detection engineering, and career development.

Read more
Feature

SOCSimulator Pricing: Free Plan Available

Compare free and Pro tiers.

Read more