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

Event ID 4717: System security access was granted to an account

Written when a logon right, such as log on locally, through Remote Desktop, as a batch job or as a service, is granted to an account in the local security policy. One event per account, usually under SYSTEM applying Group Policy.

Log source
Windows Security log
Detection value
Supporting
Volume
Low
Last updated
Audit subcategory
Audit Authentication Policy Change (Policy Change, Success)
Logged on
All Windows computers
Event versions
0
Detects
1 attack (1 rule · 1 detection logic)
MITRE ATT&CK
1 technique in 2 tactics
Threat groups
6 groups that MITRE ATT&CK records using these techniques
Fields the rules read
TargetSidAccessGranted

When it is written

Windows writes 4717 each time the local user rights policy of the computer grants a logon right to an account, one event per account. Logon rights decide how an account may start a session on the computer (locally, through Remote Desktop, from the network, as a batch job or as a service). Privileges such as Debug programs are not logon rights: their assignment is event 4704, in another subcategory. Removing a logon right is event 4718.

Any Windows computer writes it when the subcategory is enabled. Microsoft notes that the event is typically triggered by the SYSTEM account. Its description of security settings gives the reason: the security configuration engine, which applies security settings to the computer, from Group Policy or from the local policy, runs under the Local System account. The administrator who edited the Group Policy object is therefore not in the event. Account Modified (TargetSid) holds only a SID, which Event Viewer resolves to a name.

Changing the policy takes administrator rights on the computer, or permission to edit a Group Policy object that applies to it. Microsoft's description of security settings puts logon rights (it calls them sign-in rights) and privileges together under User Rights Assignment. Group Policy keeps these settings in template files in SYSVOL, which each computer downloads and applies. Microsoft says security settings are also reapplied every 16 hours whether or not anything changed; its event page ties 4717 to a change of the policy that grants a logon right, so expect no event from a refresh that changes nothing. On domain controllers, Microsoft says the same engine carries user rights changes made directly through the LSA into the Default Domain Controllers Policy, so that they are synchronized across domain controllers (its example is an application installed on the domain controller that holds the PDC operations master role). It does not name logon rights there, so check the policy before you read a logon right granted directly on one domain controller as a change of that one only.

How to turn it on

Advanced audit policy subcategory Audit Authentication Policy Change, 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 > Policy Change > Audit Authentication Policy Change
Microsoft's recommendation per computer role
ComputerAuditNote
Domain controllersSuccessMicrosoft's general and stronger baselines both recommend Success auditing, which records operations on domain and forest trusts and changes to the Kerberos policy. The subcategory has no failure events.
Member serversSuccessMicrosoft's general and stronger baselines both recommend Success auditing, which records changes to logon rights and to the password policy. The subcategory has no failure events.
WorkstationsSuccessMicrosoft's general and stronger baselines both recommend Success auditing, which records changes to logon rights and to the password policy. The subcategory has no failure events.
Check the current setting
auditpol /get /subcategory:"Authentication Policy Change"
Based on vendor documentation.
Turn it on (local policy; a domain GPO overrides it)
auditpol /set /subcategory:"Authentication Policy Change" /success:enable
Based on vendor documentation.
The same on a Windows in another display language
auditpol /get /subcategory:"{0CCE9230-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 changed the local logon rights policy. Usually S-1-5-18 (SYSTEM), the account under which Windows applies security settings. Event Viewer shows it resolved to a name.v0
Account NameSubjectUserNameSubjectName of that account. With SYSTEM, the computer account (a name ending with $).v0
Account DomainSubjectDomainNameSubjectDomain of that account, usually as a NetBIOS name.v0
Logon IDSubjectLogonIdSubjectLogon ID of the session that made the change, in hexadecimal. 0x3e7 is the SYSTEM session; other values match a logon event (4624).v0
Account NameTargetSidAccount ModifiedRead by 1 ruleSID of the account or group that received the right (shown as Account Name under Account Modified). The event holds no name; Event Viewer resolves the SID, a log collector may not.v0
Access RightAccessGrantedAccess GrantedRead by 1 ruleName of the logon right granted (shown as Access Right), such as SeServiceLogonRight. Microsoft's event page lists ten values, five allow rights and five deny rights; its subcategory page names only the five allow rights.v0

Values to know

Access Right AccessGranted

ValueMeaningSignal
SeInteractiveLogonRightAllow log on locallyRead by the logon right rule. On a domain controller it gives a session next to the directory database and the credentials in memory.Attack signal
SeRemoteInteractiveLogonRightAllow log on through Remote Desktop ServicesRead by the logon right rule. Microsoft's table still calls it Terminal Services.Attack signal
SeBatchLogonRightLog on as a batch jobRead by the logon right rule.Attack signal
SeServiceLogonRightLog on as a serviceRead by the logon right rule. Routine for service accounts on member servers.Attack signal
SeNetworkLogonRightAccess this computer from the networkWorth knowing
SeDenyNetworkLogonRight, SeDenyInteractiveLogonRight, SeDenyRemoteInteractiveLogonRight, SeDenyBatchLogonRight, SeDenyServiceLogonRightThe deny rightsGranting them restricts access.Noise

Account Name TargetSid

ValueMeaningSignal
S-1-5-32-544BUILTIN\AdministratorsLeft out by the rule.Expected
Any other SIDA user, group or service account that received the rightOn a domain controller, compare with the accounts the right is meant for.Attack signal

Security ID SubjectUserSid

ValueMeaningSignal
S-1-5-18SYSTEM, the computer applied the policyThe typical subject according to Microsoft, and the subject of its sample event.Expected
Any other SIDAn account other than SYSTEM changed the policyMicrosoft recommends reporting this case and does not describe it further. Expect a program that changed the local policy directly in that account's session.Attack signal

Volume and noise

Low. It appears when a User Rights Assignment setting changes in Group Policy (every computer in scope logs it when it applies the change), and when setup programs or administrators grant a right such as Log on as a service to a service account. Microsoft gives it a potential criticality of Low in its list of Active Directory events to monitor; on domain controllers and other Tier 0 servers, a new logon right is rare.

Keeping it manageable

  • Collect 4717 from domain controllers and Tier 0 servers. The logon right rule reads AccessGranted (SeInteractiveLogonRight, SeRemoteInteractiveLogonRight, SeBatchLogonRight, SeServiceLogonRight) and TargetSid, and leaves out grants to BUILTIN\Administrators (S-1-5-32-544).
  • Apply the rule to the logs of domain controllers, or to other Tier 0 servers on purpose. On ordinary servers, grants of Log on as a service to service accounts are routine.
  • Grants of deny rights (SeDeny...LogonRight) restrict access and can go to a lower priority. Their removal is event 4718.
  • Report the event whenever the subject is not SYSTEM, whatever the right, 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>4717</EventID>
    <Version>0</Version>
    <Level>0</Level>
    <Task>13569</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>DC02.corp.example.com</Computer>
    <Security />
  </System>
  <EventData>
    <Data Name="SubjectUserSid">S-1-5-18</Data>
    <Data Name="SubjectUserName">DC02$</Data>
    <Data Name="SubjectDomainName">CORP</Data>
    <Data Name="SubjectLogonId">0x3e7</Data>
    <Data Name="TargetSid">S-1-5-21-1004336348-1177238915-682003330-1121</Data>
    <Data Name="AccessGranted">SeRemoteInteractiveLogonRight</Data>
  </EventData>
</Event>

Attacks this event reveals

Detection rules that read this event:

Frequently asked questions

What is the difference between event 4717 and event 4704?

Windows separates logon rights, which decide how an account may start a session, from privileges, which allow system-level actions. Event 4717 records a granted logon right and belongs to Audit Authentication Policy Change. Event 4704 records an assigned privilege and belongs to Audit Authorization Policy Change. Enable both subcategories to see both.

Why is the subject of event 4717 SYSTEM?

Microsoft's event page says only that the event is typically triggered by the SYSTEM account. Its description of security settings gives the reason, since the engine that applies security settings to the computer, from Group Policy or from the local policy, runs under the Local System account. When the right arrived through Group Policy, the person behind the change edited the Group Policy object and is not in the event. Microsoft recommends reporting any other subject and does not describe that case further. Expect a program that changed the local policy directly in an account's session.

Why does event 4717 show a SID instead of an account name?

The event stores only the SID of the account that received the right. Event Viewer resolves it when it displays the event; in a SIEM, resolve it against your directory or a lookup table.

Which logon rights matter on a domain controller?

Log on locally, Log on through Remote Desktop Services, Log on as a batch job and Log on as a service each give an account a way to run code on the domain controller. Any grant of them to an account outside the groups your baseline names deserves an explanation.

References