AD-GRP-05 - Group SID History count should be retrievable
Overviewβ
- SID History is an attribute used during Active Directory domain migrations to maintain access to resources in the source domain:
- Groups with SID History are important to monitor because persistent SID History on groups can indicate:
- Incomplete migrations: Groups that were migrated but never fully transitioned
- Security risks: SIDs from untrusted or decommissioned domains may grant unintended access
- Directory bloat: Unnecessary data that complicates troubleshooting and auditing
- Audit complexity: Makes it difficult to determine effective permissions
- Trust dependencies: Hidden dependencies on domains that may no longer exist
- Groups with SID History are particularly concerning because they often control access to resources, and the SID History may grant access to users or groups from the source domain.
Security Recommendationβ
- Review all groups with SID History to determine if migration is complete
- Remove SID History attributes once group memberships are verified in the new domain
- Be cautious of SID History containing SIDs from external or untrusted domains
- Document any groups that legitimately require long-term SID History
- Regularly audit SID History contents during security reviews
How the Test Worksβ
- This test retrieves all group objects from Active Directory and:
- Checks the SIDHistory attribute for each group
- Counts groups where SIDHistory is populated with one or more SIDs
- Calculates the percentage of groups with SID History
Related Testsβ
Test-MtAdGroupStaleCount- Groups with SID History may also be stale if migration was long agoTest-MtAdGroupAdminCount- Privileged groups with SID History require special attention
Related linksβ
- Microsoft Defender for Identity: Unsecure SID History attributes
- ANSSI Active Directory checkpoints: Accounts or groups with SID history set
Test Metadataβ
| Field | Value |
|---|---|
| Test ID | AD-GRP-05 |
| Severity | Medium |
| Suite | Active Directory |
| Category | AD.Group |
| PowerShell test | Test-MtAdGroupSidHistoryCount |
| Tags | AD, AD-GRP-05, AD.Group |
Sourceβ
- Pester test:
tests/ad/group/Test-MtAdGroupSidHistoryCount.Tests.ps1 - PowerShell source:
powershell/public/ad/group/Test-MtAdGroupSidHistoryCount.ps1


