Skip to content

How to Audit Active Directory Group Membership Changes Print

  • 0

Audit Active Directory security-group membership changes on the domain controllers that process them, then collect the events centrally. The useful result is not simply a list of event IDs: an investigator should be able to establish who changed which group, which account was affected and whether the change was authorized.

Decide which membership changes matter

Begin with the groups that grant access to privileged administration, business applications and sensitive file shares. Record the group’s name, scope, owner and expected change process. A routine approved access request and an unexpected addition to a privileged group should not produce the same operational response.

Domain-group changes are recorded on the domain controller processing the change when the relevant auditing is enabled. Local security-group changes on a member server are a separate collection concern. Watching one application server’s Security log does not provide a complete history of domain-group administration.

Prepare a controlled audit-policy change

Use an account authorized to manage the applicable domain-controller policy. Capture the existing policy, GPO scope and effective settings before making changes. Select a pilot controller or a controlled validation process appropriate to the domain; avoid introducing a broad unreviewed audit policy just to make a single test event appear.

In Group Policy Management, locate Advanced Audit Policy Configuration under Computer Configuration, Windows Settings, Security Settings. Review Account Management and Audit Security Group Management. Enable the success auditing required for successful membership changes and set failure auditing according to the organization’s monitoring policy. Check the interaction with the policy that makes audit subcategory settings override legacy category settings.

Check the effective setting on the controller

After the governing GPO has applied, inspect the effective audit setting. The following subcategory name is the English label; localized installations can use another label. Use auditpol’s subcategory listing to identify the installed name rather than treating an unrecognized English label as proof that auditing is unavailable.

auditpol /list /subcategory:*
auditpol /get /subcategory:"Security Group Management"

Generate a harmless membership-change test

Use a dedicated test security group and an approved test account. Record the start time, add the account to the group and remove it again. Do not test by adding an ordinary account to Domain Admins or another production privileged group. Query the controller involved in the change and keep the authorized change record with the resulting events.

The membership event families depend on group scope: global security groups use 4728 for additions and 4729 for removals; local or domain-local security groups use 4732 and 4733; universal security groups use 4756 and 4757. These events should be interpreted alongside the group context and the computer that generated them.

Query recent events without assuming every result is suspicious

The example retrieves recent membership-change events from the local Security log. Run it on the relevant controller, or use your approved remote-collection method. A bounded time window is easier to investigate than an arbitrary list of the last twenty events from a busy domain.

$start = (Get-Date).AddHours(-2)
$ids = 4728,4729,4732,4733,4756,4757
Get-WinEvent -FilterHashtable @{LogName="Security"; Id=$ids; StartTime=$start} |
    Select-Object TimeCreated,Id,MachineName,Message

Read the actor, member and target group separately

In a membership event, the Subject identifies the security context that performed the action. The Member identifies the account being added or removed. The target group fields identify the affected group. Confusing Subject with Member can lead an investigator to blame the account whose access changed instead of the administrator or service that made the change.

Account names can be unresolved or rendered differently across localized systems, so retain the original event XML and SIDs when exporting evidence. For automation, parse named XML fields instead of relying on fixed property-array positions or searching an English message string. Correlate the event time with the approved ticket, administrative session and other relevant identity events.

Collect, retain and alert on the right evidence

Forward the relevant events from all in-scope domain controllers to the approved collector or SIEM. Include the originating computer and timestamp, protect access to the collector and size retention around the actual event rate and incident-response needs. A dashboard that looks healthy while the oldest events are overwritten too quickly does not provide the intended audit trail.

Pilot alerts on high-value groups, unexpected actors and changes outside the normal approval process. Include the owner and response action in the rule. Alerting on every group change without context can overwhelm the people who need to respond to a genuinely unusual addition. Verify the complete path by finding the controlled test event in the central system, not only in the source log.

Troubleshooting and rollback

If the event is missing, confirm that the change actually occurred, identify the controller that processed it, inspect the effective success-audit setting and verify that the correct Security log and time window were queried. Check forwarding permissions and subscription health separately when the event exists locally but not centrally.

To roll back an audit-policy change, restore the recorded setting in the governing GPO and verify the effective policy after refresh. Keep the collected evidence and test results. Clearing the Security log is not part of reverting the policy and removes information that may be needed later.

Account for nested membership and local groups

A change to a nested group can alter effective access without directly editing the high-value parent group. For example, adding a user to an application-operators group can grant privileged access if that group is already nested into another access-granting group. Maintain the relevant nesting relationships and include the intermediate groups in the monitoring design.

Keep a periodic membership baseline as a separate control. Event history explains observed changes, while a current membership inventory helps detect gaps caused by missing retention or collection. Neither replaces the other: a snapshot alone does not identify the actor, and an incomplete event stream cannot prove the current state is authorized.

Domain-local groups and a member server's local SAM groups can share the 4732/4733 event family, but the originating computer and target context distinguish them. Collect local privileged-group changes from relevant member servers separately. Do not assume a domain-controller subscription covers local Administrators changes across every application host.

Parse named fields for repeatable investigation

For a controlled local investigation, the following example extracts named event fields rather than message positions. It is a read-only summary, not a replacement for retaining the original event and its full metadata:

$events = Get-WinEvent -FilterHashtable @{
    LogName='Security'; Id=4728,4729,4732,4733,4756,4757
    StartTime=(Get-Date).AddHours(-2)
}
$events | ForEach-Object {
    $event = $_
    $xml = [xml]$event.ToXml()
    $data = @{}
    foreach ($field in $xml.Event.EventData.Data) {
        $data[$field.Name] = $field.'#text'
    }
    [pscustomobject]@{
        TimeCreated=$event.TimeCreated
        Computer=$event.MachineName
        RecordId=$event.RecordId
        EventId=$event.Id
        ActorSid=$data['SubjectUserSid']
        ActorLogonId=$data['SubjectLogonId']
        MemberSid=$data['MemberSid']
        GroupSid=$data['TargetSid']
        GroupName=$data['TargetUserName']
    }
}

Retain the originating computer, log and record identifier when correlating results. A record number alone is not globally unique across every domain controller. Use SIDs to identify the actor, member and group even if a name later changes or no longer resolves.

Set realistic alert and failure-audit expectations

These membership-addition and removal events describe successful changes. Do not assume enabling failure auditing produces a matching event for every denied membership attempt; the subcategory's documented event support matters. Failed administrative activity may require other authentication, authorization or directory-service evidence in the wider monitoring design.

For an alert, include the changed group, added or removed member, actor, source controller, timestamp and a link to the authorized change record where available. A service account appearing as actor may represent an access-management system, so investigate its workflow and session evidence before attributing the change to a person.

Measure collection delay and test loss conditions. A forwarded event arriving hours late may still support investigation but fail an immediate-response objective. Monitor collector health, subscription errors and retention independently of the rule that detects privileged membership changes.

Official references and related guidance

Use Microsoft’s Audit Security Group Management reference and membership-event field description to interpret the event family. For the hosting foundation around this workflow, explore managed Windows VPS hosting in Canada.

Related procedures

How to Configure the Active Directory Recycle Bin; How to Create a Fine-Grained Password Policy in Active Directory; How to Transfer and Seize Active Directory FSMO Roles Safely.


Was this answer helpful?

« Back