User non-standard primary group count should be retrievable
AD-USER-12InfoActive DirectoryUsers
Part of Active Directory · Active Directory · Users · All checks
Invoke-Maester -TestId AD-USER-12Overview
Section titled “Overview”Most user accounts use PrimaryGroupId = 513, which corresponds to Domain Users. When a user has a different primary group, the configuration is often intentional but uncommon.
- Privilege review: Non-standard primary groups can indicate elevated or specialized access models
- Migration residue: Legacy migrations and scripted provisioning may leave unusual values behind
- Access clarity: Atypical primary groups make account analysis more complex
Control Type
Section titled “Control Type”Detective
Security Recommendation
Section titled “Security Recommendation”- Review users whose
PrimaryGroupIdis not513 - Confirm the configuration is required and documented
- Standardize primary groups where there is no operational reason for deviation
How the Test Works
Section titled “How the Test Works”This test counts user objects where primaryGroupId is populated and not equal to 513.
Related Tests
Section titled “Related Tests”Test-MtAdUserAdminCountCount- Highlights protected or privileged accountsTest-MtAdUserSidHistoryCount- Identifies migration-related account artifacts
Related links
Section titled “Related links”- Microsoft Defender for Identity: Accounts with non-default Primary Group ID
- ANSSI Active Directory checkpoints: Accounts with modified PrimaryGroupID
Details
Section titled “Details”Every attribute of this check
| Field | Value |
|---|---|
| Test ID | AD-USER-12 |
| Severity | Info |
| Suite | Active Directory |
| Product | Active Directory |
| Feature | Users |
| Area | Identity lifecycle and hygiene |
| Resource type | User |
| MITRE ATT&CK | None |
| PowerShell test | Test-MtAdUserNonStandardPrimaryGroupCount |
| Services | ActiveDirectory |
| Permissions | ActiveDirectory:Ldap:user:ReadProperty |
Source
Section titled “Source”- Test:
tests/ad/user/Test.AD-USER-12.ps1 - Documentation:
tests/ad/user/Test.AD-USER-12.md
About this check
- Severity
- Info
- Product
- Active Directory
- Feature
- Users
- Area
- Identity lifecycle and hygiene
- Suite
- Active Directory