# Cross-forest references count should be retrievable

Cross-forest references represent security principals (users, groups, computers) from trusted external forests that have been granted access to resources…

Source: https://maester.dev/docs/tests/AD-FORS-04

<!-- 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 · Domain and forest · <a href="/docs/tests">All checks</a></p>

```powershell title="Run this check"
Invoke-Maester -TestId AD-FORS-04
```

## Overview

Cross-forest references represent security principals (users, groups, computers) from trusted external forests that have been granted access to resources in the local forest. Understanding cross-forest references is critical for:

 * **Trust Management**: Cross-forest references indicate active trust relationships that must be monitored and maintained
 * **Security Boundaries**: External forest references expand the security boundary beyond the local forest
 * **Access Control**: References from external forests may have access to local resources; these must be regularly audited
 * **Compliance**: Many compliance frameworks require documentation and monitoring of cross-forest access
 * **Risk Assessment**: Unknown or unexpected cross-forest references could indicate security compromise or misconfiguration

#### Control Type

**Operational**

#### Security Recommendation

If cross-forest references exist:

1. **Inventory and Document**: Maintain an inventory of all cross-forest references and their purposes
2. **Regular Review**: Review cross-forest references quarterly to ensure they are still needed
3. **Trust Verification**: Verify that trusts with external forests are still required and properly secured
4. **Access Audit**: Audit what resources cross-forest principals can access in the local forest
5. **Monitor for Changes**: Set up alerting for new cross-forest references, which could indicate unauthorized access provisioning

#### How the Test Works

This test retrieves cross-forest reference information from the forest configuration using `Get-ADForest`. It counts the number of cross-forest references and reports whether any external forest principals have been granted access to local resources.

#### Related Tests

- `Test-MtAdTrustTotalCount` - Checks for configured domain trusts
- `Test-MtAdTrustDetails` - Provides detailed trust configuration information

## Details

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

| Field | Value |
| --- | --- |
| Test ID | AD-FORS-04 |
| Severity | Info |
| Suite | Active Directory |
| Product | Active Directory |
| Feature | Domain and forest |
| Area | External access and sharing |
| Resource type | Tenant |
| MITRE ATT&CK | None |
| PowerShell test | [Test-MtAdCrossForestReferencesCount](https://github.com/maester365/maester/blob/main/tests/ad/domain/Test.AD-FORS-04.ps1) |
| Services | ActiveDirectory |
| Permissions | ActiveDirectory:Ldap:crossRef:ReadProperty |

</details>

## Source

- Test: [`tests/ad/domain/Test.AD-FORS-04.ps1`](https://github.com/maester365/maester/blob/main/tests/ad/domain/Test.AD-FORS-04.ps1)
- Documentation: [`tests/ad/domain/Test.AD-FORS-04.md`](https://github.com/maester365/maester/blob/main/tests/ad/domain/Test.AD-FORS-04.md)
