# Agent Identity Blueprint Principals should have an existing Blueprint (Preview)

Agent Identity Blueprint Principals should have an existing Blueprint.

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

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

## Overview

Agent Identity Blueprint Principals should have an existing Blueprint.

An Agent Identity Blueprint defines how Agent Identities are created and managed. A Blueprint
Principal is the service principal created from that Blueprint in the tenant. If the Blueprint
is deleted but the Principal remains, the linked Agent Identities can fall outside the
Blueprint's management and lifecycle.

This check lists Blueprint Principals whose Blueprint no longer exists. Review each one before
deleting or restoring anything. The remaining Principal or Agent Identities may still have
permissions and access assignments.

### Remediation action:

1. Open the [Microsoft Entra admin center][entra-admin-center] and go to **Entra ID** >
   **Agents** > **Agent blueprints**.
2. Search for the reported **Blueprint App ID** and confirm whether the Blueprint was deleted
   or whether the Blueprint Principal is no longer required.
3. Review the reported Blueprint Principal and linked Agent Identity object IDs, including their
   owners, sponsors, permissions, audit logs, and sign-in logs.
4. If the agent is still required, follow Microsoft's restore guidance. If it is no longer
   required, disable the linked identities, review their access, and then remove the stale Agent
   ID objects in the order described by Microsoft.

### Related links

* [View and manage Agent Identity Blueprints][manage-blueprints]
* [How to delete and restore Agent Identity objects][delete-agent-id]
* [Agent Identity Blueprint resource][blueprint-resource]

[entra-admin-center]: https://entra.microsoft.com
[manage-blueprints]: https://learn.microsoft.com/entra/agent-id/manage-agent-blueprint
[delete-agent-id]: https://learn.microsoft.com/entra/agent-id/howto-delete-agent-identity
[blueprint-resource]:
  https://learn.microsoft.com/graph/api/resources/agentidentityblueprint?view=graph-rest-1.0

## Details

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

| Field | Value |
| --- | --- |
| Test ID | MT.1203 |
| 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 |
| PowerShell test | [Test-MtEntraAgentBlueprintOrphaned](https://github.com/maester365/maester/blob/main/tests/maester/entra/Test.MT.1203.ps1) |
| Services | Graph |
| Lifecycle | Preview |

</details>

## Source

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