# Agent Identity Blueprint Principals should require assignment for the application roles they expose (Preview)

Agent Identity Blueprint Principals that expose application roles should require an explicit assignment before another identity can use them.

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

<!-- 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.1212 -IncludePreview
```

## Overview

Agent Identity Blueprint Principals that expose application roles should require
an explicit assignment before another identity can use them.

Application roles control which applications or agents can access capabilities
provided by an Agent Identity Blueprint Principal. If assignment isn't required,
an identity in the tenant may receive a token for an enabled role without an
administrator explicitly granting it access. Requiring assignment ensures that
only approved identities can use those roles.

This test reports Agent Identity Blueprint Principals that expose at least one
enabled application role but don't require assignment. Disabled application
roles aren't included in the assessment.

### Remediation action:

1. Open the [Microsoft Entra admin center][entra-admin-center] and navigate to **Entra ID** > **Enterprise applications**.
2. Locate the reported Blueprint Principal using its **Object ID** or display name.
3. Under **Properties**, set **Assignment required?** to **Yes**.
4. Under **Users and groups** (or the equivalent app role assignment surface), explicitly assign the principals that should be able to obtain tokens for the exposed roles.

### Related links

* [View and manage agent blueprints][manage-blueprints]
* [Restrict your Microsoft Entra app to a set of users][restrict-app-users]

[entra-admin-center]: https://entra.microsoft.com
[manage-blueprints]: https://learn.microsoft.com/entra/agent-id/manage-agent-blueprint
[restrict-app-users]: https://learn.microsoft.com/entra/identity-platform/howto-restrict-your-app-to-a-set-of-users

## Details

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

| Field | Value |
| --- | --- |
| Test ID | MT.1212 |
| Severity | Medium |
| Suite | Maester |
| Product | Entra ID |
| Feature | Agent identities |
| Area | AI and agents |
| Resource type | Agent |
| User impact | Low |
| Implementation cost | Low |
| MITRE ATT&CK | T1078.004 Cloud Accounts |
| Supports controls | nist-800-53-r5:AC-3, nist-800-53-r5:AC-6 |
| PowerShell test | [Test-MtEntraAgentBlueprintOpenAccess](https://github.com/maester365/maester/blob/main/tests/maester/entra/Test.MT.1212.ps1) |
| Services | Graph |
| Lifecycle | Preview |

</details>

## Source

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