# Intermediate CA count should be retrievable

Intermediate Certification Authorities (CAs) sit between root CAs and end-entity certificates.

Source: https://maester.dev/docs/tests/AD-CFG-18

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

```powershell title="Run this check"
Invoke-Maester -TestId AD-CFG-18
```

## Overview

Intermediate Certification Authorities (CAs) sit between root CAs and end-entity certificates. They influence which certificate chains can be built for authentication and other PKI-backed operations.

A sudden change in the number of intermediate CAs can indicate:
- Unauthorized issuance paths being introduced
- Configuration drift from expected PKI baselines
- Incomplete/incorrect CA role deployment after PKI changes

Monitoring the *count* helps you detect unexpected additions/removals quickly, before they result in trust failures or broadened trust.

#### Control Type

**Operational**

#### Security Recommendation
- Maintain an approved list of intermediate CA thumbprints/subjects and treat deviations as security-relevant events.
- Investigate and remediate any intermediate CA entries that were not deployed through your change management process.
- Use this count as an early indicator before running deeper CA detail validation tests.

#### How the Test Works
The test queries AD configuration for intermediate CA entries and returns the number of intermediate CAs currently present. This provides a baseline for expected PKI hierarchy structure and change detection.

#### Related Tests
- [Test-MtAdIntermediateCaDetails](/docs/commands/Test-MtAdIntermediateCaDetails)

## Details

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

| Field | Value |
| --- | --- |
| Test ID | AD-CFG-18 |
| Severity | Info |
| Suite | Active Directory |
| Product | Active Directory |
| Feature | Certificate Services |
| Area | Infrastructure hardening |
| Resource type | CertificateAuthority |
| MITRE ATT&CK | None |
| PowerShell test | [Test-MtAdIntermediateCaCount](https://github.com/maester365/maester/blob/main/tests/ad/config/Test.AD-CFG-18.ps1) |
| Services | ActiveDirectory |
| Permissions | ActiveDirectory:Ldap:Configuration/*:ReadProperty |

</details>

## Source

- Test: [`tests/ad/config/Test.AD-CFG-18.ps1`](https://github.com/maester365/maester/blob/main/tests/ad/config/Test.AD-CFG-18.ps1)
- Documentation: [`tests/ad/config/Test.AD-CFG-18.md`](https://github.com/maester365/maester/blob/main/tests/ad/config/Test.AD-CFG-18.md)
