Event ID 4738 Windows Security log

Event ID 4738: A User Account Was Changed — Reading Changed Attributes

Published

A user object was changed — the event names the account that was changed, the account that changed it, and whichever attributes carry new values, so it is where account tampering becomes visible.

Logged on: Microsoft states the event generates on domain controllers, member servers, and workstations — the machine whose account store holds the changed object.

Microsoft's title

4738(S): A user account was changed.

Source: Microsoft's event 4738 documentation · field names checked against it on every build

Fields that matter in an investigation

FieldXML / SentinelWhat it tells you
Account Name SubjectUserName Subject: the name of the account that requested the "change user account" operation — the identity to hold responsible for the change.
Security ID SubjectUserSid SID of the account that requested the change; the authoritative identifier when the name is ambiguous, renamed or cannot be resolved.
Logon ID SubjectLogonId Hexadecimal value that correlates the change with recent events carrying the same Logon ID, for example the 4624 that created the session which made the change.
Account Name TargetUserName Target Account: the name of the account that was changed — the object whose attributes the rest of the event describes.
User Account Control UserAccountControl Shows the list of changes in the userAccountControl attribute, one line of text per change; this is where enabling, disabling and password-behaviour flags surface.
New UAC Value NewUacValue The new value of the SAM implementation of account flags (Microsoft notes the definition differs from userAccountControl in AD); Old UAC Value holds the previous one, so the pair shows the direction of a flag change.
AllowedToDelegateTo AllowedToDelegateTo The list of SPNs to which this account can present delegated credentials; anything other than a dash means the services list changed, and Microsoft notes you see the new list instead of changes.
User Workstations UserWorkstations The list of NetBIOS or DNS names of the computers from which the user can logon; a change widens or narrows where the credentials may be used.
Password Last Set PasswordLastSet The last time the account password was modified — Microsoft gives a manual user account password reset as an example of what changes this value.
SID History SidHistory Previous SIDs used for the object; Microsoft states this field will always be set to - unless the account was migrated from another domain, so any value deserves explanation.

What it records

Event 4738 is Windows reporting that a user object changed. Microsoft’s description is short: “This event generates every time user object is changed.” It is written on all three tiers — “This event generates on domain controllers, member servers, and workstations” — so a domain account change lands on the DC that processed it and a local account change lands on that machine. One event covers one change: “For each change, a separate 4738 event will be generated.”

The event has three parts. Subject (Security ID, Account Name, Account Domain, Logon ID) is the account that requested the “change user account” operation. Target Account (Security ID, Account Name, Account Domain) is the account that was changed. Everything after that is Changed Attributes: SAM Account Name, Display Name, User Principal Name, Home Directory, Home Drive, Script Path, Profile Path, User Workstations, Password Last Set, Account Expires, Primary Group ID, AllowedToDelegateTo, Old UAC Value, New UAC Value, User Account Control, User Parameters, SID History and Logon Hours. An attribute that was not changed appears as a dash, so on a domain controller the populated attributes are the change.

Two caveats shape triage. First, a 4738 can arrive with every attribute showing a dash; Microsoft says this usually happens when the change was to an attribute the event does not list, and gives a DACL change as the example — the event confirms something changed and nothing more. Second, “Some changes do not invoke a 4738 event”, so the audit trail is not exhaustive.

The flag fields need care. User Account Control “shows the list of changes in userAccountControl attribute. You will see a line of text for each change.” In the raw XML those lines are message identifiers — Microsoft’s sample event shows %%2050 %%2089 — which Event Viewer renders as text. Old UAC Value and New UAC Value are the SAM implementation of account flags, whose definition Microsoft notes differs from userAccountControl in AD.

When it matters

What the event showsReading
User Account Control lines around enable/disableThe account’s state was flipped; pair with 4722 or 4725 and with 0xC0000072 failures before or after
AllowedToDelegateTo not a dashThe services list on the Delegation tab changed — Microsoft’s own recommendation is to monitor exactly this condition
AllowedToDelegateTo marked <value not set>Microsoft: “it means the list was cleared” on an account that previously had a services list
SID History not a dash”This field will always be set to - unless the account was migrated from another domain” — unexpected outside a migration
Primary Group ID not 513Microsoft: “Typically, the Primary Group value is 513 for domain and local users. Other values should be monitored.”
User Workstations changedWhere the account may log on from was redefined; related failures carry 0xC0000070
Logon Hours changedTime restrictions were rewritten; related failures carry 0xC000006E
Password Last Set changedMicrosoft gives a manual account password reset as a cause — correlate with 4723/4724
Account Expires changedA leaver or expired account was given life again

Microsoft notes that “Some organizations monitor every 4738 event”, and otherwise recommends watching the event where Target Account\Account Name is a critical account — domain administrators and service accounts — and monitoring all changes to Display Name, User Principal Name, Home Directory, Home Drive, Script Path, Profile Path, User Workstations, Password Last Set, Account Expires, Primary Group ID and Logon Hours for those accounts.

How to investigate

Start with flag changes, which carry the most security weight:

SecurityEvent
| where TimeGenerated > ago(7d)
| where EventID == 4738
| parse EventData with * 'UserAccountControl">' UacChanges '<' *
| parse EventData with * 'OldUacValue">' OldUacValue '<' *
| parse EventData with * 'NewUacValue">' NewUacValue '<' *
| where UacChanges != "-"
| project TimeGenerated, Computer, TargetUserName, TargetDomainName,
          SubjectUserName, SubjectDomainName, SubjectLogonId,
          UacChanges, OldUacValue, NewUacValue
| order by TimeGenerated desc

Then the two attributes that should almost never move — the delegation list and SID history:

SecurityEvent
| where TimeGenerated > ago(30d)
| where EventID == 4738
| parse EventData with * 'AllowedToDelegateTo">' AllowedToDelegateTo '<' *
| parse EventData with * 'SidHistory">' SidHistory '<' *
| parse EventData with * 'PrimaryGroupId">' PrimaryGroupId '<' *
| where AllowedToDelegateTo != "-" or SidHistory != "-"
      or (PrimaryGroupId != "-" and PrimaryGroupId != "513")
| project TimeGenerated, Computer, TargetUserName, SubjectUserName,
          AllowedToDelegateTo, SidHistory, PrimaryGroupId
| order by TimeGenerated desc

Finally, look at the operator rather than the object — one subject rewriting many accounts in a short window is the shape of scripted manipulation rather than help-desk work:

SecurityEvent
| where TimeGenerated > ago(1d)
| where EventID in (4738, 4720, 4722, 4724, 4725, 4732)
| summarize Changes = count(), Targets = dcount(TargetUserName),
            TargetList = make_set(TargetUserName, 20), Events = make_set(EventID, 10)
    by SubjectUserName, SubjectDomainName, SubjectLogonId, Computer
| order by Targets desc, Changes desc

When a change looks wrong, pivot on SubjectLogonId: the matching 4624 tells you how that session was created, from which address and by which logon type, and whether the administrator’s own credentials were used from a machine they never use. Work outward to the account-management events around it — 4720 creation, 4722/4725 enable and disable, 4723/4724 password change and reset, 4732 group additions, 4740 and 4767 lockout and unlock — and to any lockouts carrying 0xC0000234. Without a SIEM, export the Security log as XML from Event Viewer and load it into the free browser log analyzer to read the EventData of each 4738 directly.

Free tools for this

Related events and codes

  • Event ID 4624 An account was successfully logged on.
  • Event ID 4720 A user account was created.
  • Event ID 4722 A user account was enabled.
  • Event ID 4723 An attempt was made to change an account's password.
  • Event ID 4724 An attempt was made to reset an account's password.
  • Event ID 4725 A user account was disabled.
  • Event ID 4726 A user account was deleted.
  • Event ID 4732 A member was added to a security-enabled local group.
  • Event ID 4740 A user account was locked out.
  • Event ID 4767 A user account was unlocked.
  • 0xC0000072 Windows refused the logon because the account is disabled — the name exists, so the useful question is who or what still tries to use it, from where, and why.
  • 0xC0000070 The account is restricted to a list of computers it may log on from, and this attempt came from one that is not on the list, so Windows rejected it because of where it came from rather than because of the name or the password.
  • 0xC000006E The username and the authentication information were valid, but a restriction on the account — Microsoft's example is time-of-day restrictions — stopped the logon before it succeeded.
  • 0xC0000071 Windows refused the logon because the account's password has expired and has to be changed — routine at the end of a password cycle for a person, but a broken job when it hits a service account and a lead when it comes from a host the account never uses.
  • 0xC0000234 The account is locked because the lockout threshold was reached; every further attempt fails with this code until the lockout ends or an administrator unlocks it.

Detect it

MITRE ATT&CK: T1098T1078T1078.002T1556

Frequently Asked Questions

Why does a 4738 show every attribute as a dash?
Microsoft documents this: you might see the event without any changes inside, which "usually happens when a change is made to an attribute that is not listed in the event." The DACL is the example given, and in that case there is no way to determine from the event which attribute was changed.
Does 4738 give me the old value as well as the new one?
Only for the account flags. Old UAC Value and New UAC Value are recorded as a pair, but the other changed attributes carry the new value only — for AllowedToDelegateTo Microsoft warns that "you will see the new list instead of changes", so you cannot tell from one event what was removed.
Why do 4738 events for local accounts look like everything changed at once?
Microsoft's note covers it: "Unfortunately, for local accounts, all fields, except changed attributes, will have previous values populated." The User Account Control field is the exception — it has values only if it was modified — so on a workstation treat the populated fields as current state, not as evidence of a change.
Will every change to a user account produce a 4738?
No. Microsoft states plainly that "Some changes do not invoke a 4738 event", and separately that a single event covers one change, since "For each change, a separate 4738 event will be generated." Absence of a 4738 is therefore not proof that an account was never modified.

Find every 4738 in your own logs

Load a Windows Security event export into the free browser analyzer to group events by account, source address and status, with password spraying, brute force and lockout storms flagged. Nothing is uploaded.

Investigating something right now? LogTriage checks every address in the file against threat intelligence and writes the incident report: 10 analyses a month free. The incident pack adds the in-depth AI analysis and files up to 100 MB: 25 analyses for $19, one payment, no subscription. Pricing

Every query on this site's reference pages, the Sigma rules and a cheat sheet in one download: the Incident Response Kit, $29 once.

Monthly attack data from a real server, by email

Two short emails a month: what attacked an ordinary internet-facing server (SSH logins, web probes, scanners) and how well free IP blocklists caught the attackers. Totals only, never an IP address. You confirm by email, and every email unsubscribes in one click.

How the address is used: privacy policy.