# Domain local group count should be retrievable

Domain local groups have specific characteristics that affect your security architecture:

Source: https://maester.dev/docs/tests/AD-GRP-08

<!-- This file is generated by website/scripts/generate-test-docs.mjs. Do not edit manually. -->

<div class="test-byline"><div class="test-byline-avatars"><a class="test-byline-avatar test-byline-avatar--author" href="/contributors/soulemike" title="Michael Soule · Original author"><img src="https://github.com/soulemike.png" alt="Michael Soule" width="28" height="28" loading="lazy" decoding="async" /></a></div><div class="test-byline-meta"><span class="test-byline-text">Contributed by <a href="/contributors/soulemike">Michael Soule</a></span><a class="test-byline-link" href="/contributors">All contributors →</a></div></div>

<p class="test-part">Part of <a href="/docs/tests/ad">Active Directory</a> · Active Directory · Groups · <a href="/docs/tests">All checks</a></p>

```powershell title="Run this check"
Invoke-Maester -TestId AD-GRP-08
```

## Overview

Domain local groups have specific characteristics that affect your security architecture:

- **Domain boundary restriction**: Can only be used to assign permissions to resources within the same domain
- **Flexible membership**: Can contain users, global groups, and universal groups from any domain in the forest
- **Resource access control**: Typically used to grant access to specific resources (file shares, printers, applications)
- **AGDLP/AGUDLP strategy**: Part of Microsoft's recommended group nesting strategy (Accounts go into Global groups, which go into Domain Local groups for Permissions)

High numbers of domain local groups may indicate resource-specific access patterns.

#### Control Type

**Operational**

#### Security Recommendation

Follow Microsoft's AGDLP/AGUDLP best practices:
1. Use domain local groups to assign permissions to resources in their domain
2. Nest global or universal groups (containing users) into domain local groups
3. Avoid adding individual users directly to domain local groups
4. Name domain local groups according to their resource access purpose (e.g., "DL-FileServer01-Modify")
5. Document all resources each domain local group provides access to

#### How the Test Works

This test examines all group objects and identifies those where:
- The `GroupScope` property equals "DomainLocal"
- These groups can only assign permissions to resources in their own domain

The test provides counts and percentages to understand the distribution of group scopes in your environment.

#### Related Tests

- `Test-MtAdGroupDistributionCount` - Counts distribution groups (email-only)
- `Test-MtAdGroupSecurityCount` - Counts security groups by category
- `Test-MtAdGroupGlobalCount` - Counts global scope groups
- `Test-MtAdGroupUniversalCount` - Counts universal scope groups

## Details

<details>
<summary>Every attribute of this check</summary>

| Field | Value |
| --- | --- |
| Test ID | AD-GRP-08 |
| Severity | Info |
| Suite | Active Directory |
| Product | Active Directory |
| Feature | Groups |
| Area | Infrastructure hardening |
| Resource type | Group |
| MITRE ATT&CK | None |
| PowerShell test | [Test-MtAdGroupDomainLocalCount](https://github.com/maester365/maester/blob/main/tests/ad/group/Test.AD-GRP-08.ps1) |
| Services | ActiveDirectory |
| Permissions | ActiveDirectory:Ldap:group:ReadProperty |

</details>

## Source

- Test: [`tests/ad/group/Test.AD-GRP-08.ps1`](https://github.com/maester365/maester/blob/main/tests/ad/group/Test.AD-GRP-08.ps1)
- Documentation: [`tests/ad/group/Test.AD-GRP-08.md`](https://github.com/maester365/maester/blob/main/tests/ad/group/Test.AD-GRP-08.md)
