Microsoft 365, AD and Windows · #32

Online AD Group Membership Diff

Compares a group's member list at two points in time by identity (SID/GUID); separates renames from membership changes.

  • Data is processed in your browser and not sent to a server
  • Export: CSV

Tool

CSV with header: name,SamAccountName,SID

Same columns

What does this tool do?

Membership of privileged groups such as Domain Admins should be reviewed regularly. Comparing lists by name shows a person whose surname changed as 'removed + added' and hides the real change. The tool compares by SID (or objectGUID, or sAMAccountName).

How to use it

  1. Export before and after lists: Get-ADGroupMember 'Domain Admins' | select name,SamAccountName,SID | ConvertTo-Csv -NoTypeInformation.
  2. Paste both lists and press Calculate.

Fields

Earlier list (A)
CSV with header: name,SamAccountName,SID
Later list (B)
Same columns

Worked example

InputValue
Earlier list (A)
name,SamAccountName,SID
Ali Yılmaz,ayilmaz,S-1-5-21-1004336348-1177238915-682003330-1105
Ayşe Kaya,akaya,S-1-5-21-1004336348-1177238915-682003330-1106
Svc Backup,svc_backup,S-1-5-21-1004336348-1177238915-682003330-1201
Later list (B)
name,SamAccountName,SID
Ali Yılmaz,ayilmaz,S-1-5-21-1004336348-1177238915-682003330-1105
Ayşe Demir,ademir,S-1-5-21-1004336348-1177238915-682003330-1106
Mehmet Can,mcan,S-1-5-21-1004336348-1177238915-682003330-1310

Expected result: 1 added (Mehmet Can), 1 removed (svc_backup), 1 renamed (Ayşe Kaya → Ayşe Demir, same SID), 1 unchanged.

Ayşe's SID did not change, so there is no permission change, only a name update. Check the change request for the newly added Mehmet Can, and whether the removed service account is used in a scheduled task or backup job.

Method and assumptions

The key column is chosen as SID → objectGUID → SamAccountName; both lists must use the same kind. Comparison is case-insensitive.

Keys only in A are removed, only in B added, present in both with a different name/sAMAccountName renamed.

Using the result and troubleshooting

Treat unexpected additions as security events; search the time in the Windows security log for event IDs 4728/4732/4756 (Windows Event XML Viewer).

Limits and common mistakes

  • Nested groups are not expanded; use a list exported with -Recursive to include indirect members.
  • Names of foreign security principals (FSP) are not resolved.

Frequently asked questions

Why SID?

The SID stays the same when a person's name, OU or sAMAccountName changes. A deleted and recreated account gets a new SID even with the same name and shows as 'removed + added', which is correct.

Related tools and service

Related service: Active Directory Security Audit

Systems online tools · See all online tools