When it is written
Windows writes 4738 each time a user object is changed, one event per change. Domain controllers write it for domain accounts; member servers and workstations write it for their local accounts. Microsoft lists it as a success event only.
For a domain account, each attribute under Changed Attributes holds its new value when it changed and a dash when it did not. User Account Control lists one %% code per account control flag that was switched on or off, and Old UAC Value and New UAC Value give the flags before and after. Microsoft notes three limits: some changes write no 4738 at all; a change to an attribute the event does not list, such as the account's permissions (DACL), writes a 4738 in which every attribute is a dash; and for local accounts many fields hold the current value even when it did not change, so User Account Control is the reliable part.
A computer account can be written as a user account too. Microsoft's page for 4742 notes that setting a user-related flag on a computer object (Smartcard Required, for example) changes its account type to a normal user account, and from then on its changes are written as 4738 instead of 4742.
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| Computer | Audit | Note |
|---|---|---|
| Domain controllers | Success and Failure | Microsoft'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 servers | Success and Failure | Both 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. |
| Workstations | Success and Failure | Both 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. |
auditpol /get /subcategory:"User Account Management"auditpol /set /subcategory:"User Account Management" /success:enableauditpol /get /subcategory:"{0CCE9235-69AE-11D9-BED3-505054503030}"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.
| Field | What it holds | Since |
|---|---|---|
Security IDSubjectUserSidSubject | SID of the account that made the change. Event Viewer resolves it to a name when it can. | v0 |
Account NameSubjectUserNameSubject | Name of the account that made the change. | v0 |
Account DomainSubjectDomainNameSubject | Domain of that account, or the computer name for a local account. NT AUTHORITY for well-known principals such as LOCAL SERVICE. | v0 |
Logon IDSubjectLogonIdSubject | Logon ID of the session that made the change, in hexadecimal. The logon event of that session (4624) on the same computer carries the same value. | v0 |
Security IDTargetSidTarget Account | SID of the account that was changed. Event Viewer resolves it to a name when it can. The value to match on, because names can change. | v0 |
Account NameTargetUserNameTarget Account | Name of the account that was changed. | v0 |
Account DomainTargetDomainNameTarget Account | Domain of that account, as a NetBIOS or DNS name. For a local account, the name of the computer it belongs to. | v0 |
SAM Account NameSamAccountNameChanged Attributes | New logon name (sAMAccountName) if it changed, a dash otherwise. For local accounts it always holds the current name. A rename is also written as 4781. | v0 |
Display NameDisplayNameChanged Attributes | New displayName if it changed, a dash otherwise. For local accounts it always holds the current value. | v0 |
User Principal NameUserPrincipalNameChanged AttributesRead by 1 rule | New userPrincipalName if it changed, a dash otherwise; always a dash for local accounts. The UPN rule alerts on a new value without an @ sign, a UPN with no domain part. | v0 |
Home DirectoryHomeDirectoryChanged Attributes | New homeDirectory if it changed, a dash otherwise. For local accounts it always holds the current value. | v0 |
Home DriveHomePathChanged Attributes | New homeDrive (shown as Home Drive), a drive letter such as H:, if it changed, a dash otherwise. The field name differs from the label. | v0 |
Script PathScriptPathChanged AttributesRead by 1 rule | New scriptPath, the logon script the account runs, if it changed, a dash otherwise. The script path rule treats any value other than a dash, an empty value or | v0 |
Profile PathProfilePathChanged Attributes | New profilePath (a local or UNC roaming profile path) if it changed, a dash otherwise. | v0 |
User WorkstationsUserWorkstationsChanged Attributes | New userWorkstations list (computers the account may log on from, comma separated) if it changed, a dash otherwise. Always | v0 |
Password Last SetPasswordLastSetChanged Attributes | New pwdLastSet date and time if it changed, a dash otherwise. Microsoft notes that it changes after a password reset, for example. | v0 |
Account ExpiresAccountExpiresChanged Attributes | New accountExpires date if it changed, a dash otherwise. Expect | v0 |
Primary Group IDPrimaryGroupIdChanged AttributesRead by 2 rules | RID of the new primary group if it changed, a dash otherwise. 513 (Domain Users) is the default for user accounts. | v0 |
AllowedToDelegateToChanged AttributesRead by 1 rule | The new msDS-AllowedToDelegateTo list, the service principal names the account may delegate to, if it changed: the whole list, not the difference. | v0 |
Old UAC ValueOldUacValueChanged Attributes | Account flags before the change, in hexadecimal (SAM USER_ACCOUNT codes of MS-SAMR). | v0 |
New UAC ValueNewUacValueChanged Attributes | Account flags after the change, in hexadecimal. These are the SAM USER_ACCOUNT codes of MS-SAMR, not the userAccountControl bits of Active Directory: for example 0x10000 is Don't Require Preauth and 0x2000 Trusted For Delegation. | v0 |
User Account ControlUserAccountControlChanged AttributesRead by 6 rules | One %% code per flag that changed, separated by spaces, for example %%2050 %%2089. Event Viewer shows each as text such as 'Don't Expire Password' - Enabled. The codes come from the Windows message file msobjs.dll; Microsoft's event pages do not list them. | v0 |
User ParametersUserParametersChanged Attributes | <value changed, but not displayed> (%%1792) when the userParameters attribute (dial-in settings, among others) changed, a dash otherwise. Always | v0 |
SID HistorySidHistoryChanged AttributesRead by 1 rule | New sIDHistory value (SIDs the account held in another domain) if it changed, a dash otherwise. Microsoft says it stays a dash unless the account was migrated. | v0 |
Logon HoursLogonHoursChanged Attributes | New logonHours (when the account may log on, as day and time ranges) if they changed, a dash otherwise. Typically All for local accounts. | v0 |
PrivilegesPrivilegeListAdditional Information | Privileges used for the operation, such as SeBackupPrivilege. Usually a dash, because Windows does not always capture them. | v0 |
Dummy | Not shown in the event message and not described by Microsoft; its sample event has a dash. | v0 |
Values to know
User Account Control UserAccountControl
| Value | Meaning | Signal |
|---|---|---|
%%2096 | 'Don't Require Preauth' - EnabledThe account can get a ticket-granting ticket without proving it knows the password (AS-REP roasting). The pre-authentication rule looks for it; an attacker may switch it off again soon after. | Attack signal |
%%2064 | 'Don't Require Preauth' - DisabledPre-authentication required again. Shortly after a %%2096 on the same account it is the reversal of a targeted roast. | Worth knowing |
%%2082 | 'Password Not Required' - EnabledThe password length policy no longer applies to the account. The password not required rule looks for it. | Attack signal |
%%2050 | 'Password Not Required' - DisabledMicrosoft's sample shows it right after an account is created. | Expected |
%%2091 | 'Encrypted Text Password Allowed' - EnabledStore password using reversible encryption. The reversible encryption rule looks for it. | Attack signal |
%%2093 | 'Trusted For Delegation' - EnabledUnconstrained delegation (trust for delegation to any service). Setting it takes the Enable computer and user accounts to be trusted for delegation user right (SeEnableDelegationPrivilege), which Microsoft lists for the Administrators group on domain controllers by default. The unconstrained delegation rule looks for it. | Attack signal |
%%2098 | 'Trusted To Authenticate For Delegation' - EnabledDelegation with protocol transition. Microsoft recommends checking each one is approved. | Worth knowing |
%%2062 | 'Not Delegated' - DisabledAccount is sensitive and cannot be delegated was cleared, so the account's tickets can be delegated again. The safeguard removal rule looks for it. | Attack signal |
%%2095 | 'Use DES Key Only' - EnabledMicrosoft says it should not be set on user accounts because it weakens the account's Kerberos authentication. | Attack signal |
%%2088 | 'Server Trust Account' - EnabledThe domain controller flag. Microsoft says it should never be set on a user account. The server trust rule looks for it. | Attack signal |
%%2089 | 'Don't Expire Password' - EnabledMicrosoft recommends watching it on critical accounts, or on all accounts where your policy forbids it. | Worth knowing |
Primary Group ID PrimaryGroupId
| Value | Meaning | Signal |
|---|---|---|
- | Primary group not changed | Expected |
513 | Domain Users (Users for a local account)The default primary group of user accounts. | Expected |
512, 516, 518, 519, 526 or 527 | Domain Admins, Domain Controllers, Schema Admins, Enterprise Admins, Key Admins, Enterprise Key AdminsThe primary group is a group membership. The privileged primary group rule looks for these RIDs. | Attack signal |
Any other value | Primary group changed to another groupThe primary group change rule reports every change, at a low level. | Worth knowing |
AllowedToDelegateTo
| Value | Meaning | Signal |
|---|---|---|
- | Delegation list not changed | Expected |
One or more service names (service/host) | The constrained delegation list was setThe event shows the whole new list, not what was added. The delegation list rule looks for a value with a slash. | Attack signal |
%%1793 | <value not set>The list was cleared. Microsoft suggests watching this on accounts whose delegation must stay in place. | Worth knowing |
SID History SidHistory
| Value | Meaning | Signal |
|---|---|---|
- | SID History not changed | Expected |
One or more SIDs | SID History was writtenMicrosoft says the field stays a dash unless the account was migrated from another domain. The SID History rule alerts on any value other than a dash, an empty value or | Attack signal |
%%1793 | <value not set>SID History was cleared. | Worth knowing |
Volume and noise
Microsoft rates the volume of the subcategory as low, and 4738 follows the pace of account administration: attribute and flag changes by administrators, identity management and provisioning tools, password resets (which update Password Last Set), and the follow-up changes after an account is created. Expect events in which every changed attribute is a dash: Microsoft explains that changes to attributes the event does not list, permissions among them, still write one.
Keeping it manageable
- Keep every 4738 from domain controllers: the library's rules read six of its fields (
UserAccountControl,AllowedToDelegateTo,ScriptPath,PrimaryGroupId,SidHistory,UserPrincipalName), so a filter on one field breaks the rules on the others. - On member servers and workstations, many fields of local accounts hold the current value even when it did not change, so a rule that treats any value as a change, such as the script path rule, can match unrelated changes. Microsoft's general note says all fields of a local account are filled with their existing values and gives 513 as the primary group of local users, so expect the same for the primary group change rule and check
PrimaryGroupIdon a local account event of your own. Run these rules on domain controller events, or compare with the previous event for the sameTargetSid. - Alert first on the flags Microsoft says should not be set on user accounts:
%%2096(no pre-authentication),%%2091(reversible encryption),%%2088(server trust) and%%2082(password not required). Treat delegation, primary group and UPN changes against your change records and the accounts of your provisioning tools (SubjectUserSid). - For critical accounts (domain admins, service accounts, Tier 0), watch every 4738 by
TargetSid, as Microsoft recommends.
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>4738</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="Dummy">-</Data>
<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-1104</Data>
<Data Name="SubjectUserName">adm-alice</Data>
<Data Name="SubjectDomainName">CORP</Data>
<Data Name="SubjectLogonId">0x3a7f21</Data>
<Data Name="PrivilegeList">-</Data>
<Data Name="SamAccountName">-</Data>
<Data Name="DisplayName">-</Data>
<Data Name="UserPrincipalName">-</Data>
<Data Name="HomeDirectory">-</Data>
<Data Name="HomePath">-</Data>
<Data Name="ScriptPath">-</Data>
<Data Name="ProfilePath">-</Data>
<Data Name="UserWorkstations">-</Data>
<Data Name="PasswordLastSet">-</Data>
<Data Name="AccountExpires">-</Data>
<Data Name="PrimaryGroupId">-</Data>
<Data Name="AllowedToDelegateTo">-</Data>
<Data Name="OldUacValue">0x15</Data>
<Data Name="NewUacValue">0x211</Data>
<Data Name="UserAccountControl">%%2050 %%2089</Data>
<Data Name="UserParameters">-</Data>
<Data Name="SidHistory">-</Data>
<Data Name="LogonHours">-</Data>
</EventData>
</Event>Attacks this event reveals
Detection rules that read this event:
Frequently asked questions
Why do some 4738 events show no changed attribute?
Microsoft explains that a change to an attribute the event does not list writes a 4738 in which every changed attribute is a dash, and gives a change of the account's permissions (DACL) as the example. The event then shows that the account changed, not what changed. Event 5136, where the object is audited, records the attribute and each value removed and added.
How do I tell which account control flag changed?
Read `UserAccountControl`: one %% code per flag switched on or off, for example %%2096 'Don't Require Preauth' - Enabled or %%2062 'Not Delegated' - Disabled. The codes from %%2048 to %%2079 mark a flag switched off and from %%2080 to %%2111 a flag switched on. `OldUacValue` and `NewUacValue` give the full flag sets before and after, as MS-SAMR USER_ACCOUNT codes.
Why do 4738 events for local accounts show values that did not change?
Microsoft notes that for local accounts many fields (SAM Account Name, Display Name, Home Directory, Home Drive, Script Path, Profile Path, Password Last Set, Account Expires) always hold the current value, changed or not, and that User Account Control holds values only when the flags changed. Compare with the previous event for the same account, or rely on User Account Control.
Which 4738 changes point to an attack?
Pre-authentication switched off (%%2096), password not required (%%2082), reversible encryption (%%2091), unconstrained delegation (%%2093), the domain controller flag on a user (%%2088), the sensitive account safeguard removed (%%2062), a privileged primary group, a new constrained delegation list, SID History written, a new logon script path, and a UPN without a domain part. The library has a rule for each of them.
References
- 4738(S): A user account was changed (Microsoft)
- Audit User Account Management (Microsoft)
- 4742(S): A computer account was changed (Microsoft)
- [MS-SAMR] 2.2.1.12 USER_ACCOUNT Codes (Microsoft)
- 4720(S): A user account was created (Microsoft)
- Enable computer and user accounts to be trusted for delegation (Microsoft)
- Configuring Kerberos delegation for group Managed Service Accounts, delegation types and account flags (Microsoft)