# Agent Identities and Blueprint Principals should not be assigned privileged Entra directory roles (Preview)

Agent Identities and Blueprint Principals should not be assigned privileged Entra directory roles.

Source: https://maester.dev/docs/tests/MT.1209

<!-- 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/agnivesh" title="Agnivesh S. · Original author"><img src="https://github.com/agnivesh.png" alt="Agnivesh S." 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/agnivesh">Agnivesh S.</a></span><a class="test-byline-link" href="/contributors">All contributors →</a></div></div>

<p class="test-part">Part of <a href="/docs/tests/maester">Maester</a> · Entra ID · Agent identities · <a href="/docs/tests">All checks</a></p>

```powershell title="Run this check"
Invoke-Maester -TestId MT.1209 -IncludePreview
```

## Overview

Agent Identities and Blueprint Principals should not be assigned privileged Entra directory roles.

Assigning Entra ID directory roles (such as *Global Administrator*, *Privileged Role Administrator*, *Application Administrator*, or *Agent ID Administrator*) directly to Agent Identities or Blueprint Principals allows an AI agent or service principal to modify directory objects, credentials, or tenant configurations.

AI agents should adhere strictly to the principle of least privilege. They should be granted scoped resource permissions or delegated application permissions rather than broad administrative directory roles.

This check queries all active directory role assignments to identify Agent Identities and Blueprint Principals holding directory roles.

### Remediation action:

1. Open the [Microsoft Entra admin center][entra-admin-center] and navigate to **Entra ID** > **Roles & administrators**.
2. Search for the reported role name (e.g., *Global Administrator*, *Application Administrator*).
3. Under **Assignments**, locate the reported Agent Identity or Blueprint Principal.
4. Select the principal and click **Remove assignment**.
5. Replace administrative role assignments with specific, least-privileged API permissions or scoped resource permissions where necessary.

### Related links

* [View and manage agent identities][manage-identities]
* [Least privileged roles by task in Microsoft Entra ID][least-privilege-roles]

[entra-admin-center]: https://entra.microsoft.com
[manage-identities]: https://learn.microsoft.com/entra/agent-id/agent-lists
[least-privilege-roles]: https://learn.microsoft.com/entra/identity/role-based-access-control/delegate-by-task

## Details

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

| Field | Value |
| --- | --- |
| Test ID | MT.1209 |
| Severity | High |
| Suite | Maester |
| Product | Entra ID |
| Feature | Agent identities |
| Area | Privileged access |
| Resource type | Agent |
| User impact | Low |
| Implementation cost | Medium |
| MITRE ATT&CK | T1078.004 Cloud Accounts, T1098.003 Additional Cloud Roles |
| Supports controls | nist-800-53-r5:AC-6(5) |
| PowerShell test | [Test-MtEntraAgentDirectoryRoles](https://github.com/maester365/maester/blob/main/tests/maester/entra/Test.MT.1209.ps1) |
| Services | Graph |
| Lifecycle | Preview |
| Long running | Yes |

</details>

## Source

- Test: [`tests/maester/entra/Test.MT.1209.ps1`](https://github.com/maester365/maester/blob/main/tests/maester/entra/Test.MT.1209.ps1)
- Documentation: [`tests/maester/entra/Test.MT.1209.md`](https://github.com/maester365/maester/blob/main/tests/maester/entra/Test.MT.1209.md)
