Provision Microsoft Entra Agent Identity Blueprints, BlueprintPrincipals, and per-instance Agent Identities via Microsoft Graph, and configure OAuth 2.0 token exchange (fmi_path, OBO, cross-tenant) including the Microsoft Entra SDK for AgentID sidecar. USE FOR: Agent Identity Blueprint, BlueprintPrincipal, agent OAuth, fmi_path token exchange, agent OBO, Workload Identity Federation for agents, polyglot agent auth, Microsoft.Identity.Web.AgentIdentities. DO NOT USE FOR: standard Entra app registration (use entra-app-registration), Azure RBAC (use azure-rbac), Microsoft Foundry agent authoring (use microsoft-foundry).
SKILL.md
Microsoft Entra Agent ID
Create and manage OAuth 2.0-capable identities for AI agents using Microsoft Graph. Every agent instance gets a distinct identity, audit trail, and independently-scoped permission grants.
Quick Reference
Property
Value
Service
Microsoft Entra Agent ID
API
Microsoft Graph (https://graph.microsoft.com/v1.0)
Required role
Agent Identity Developer, Agent Identity Administrator, or Application Administrator
Microsoft Entra SDK for AgentID (sidecar container)
When to Use This Skill
Provisioning a new Agent Identity Blueprint and BlueprintPrincipal
Creating per-instance Agent Identities under a Blueprint
Configuring credentials (FIC, Managed Identity, or client secret) on the Blueprint
Implementing the two-step fmi_path runtime token exchange (autonomous or OBO)
Cross-tenant agent token flows
Deploying the Microsoft Entra SDK for AgentID sidecar for polyglot agents (Python, Node, Go, Java)
Installs
0
Granting per-Agent-Identity application (appRoleAssignments) or delegated (oauth2PermissionGrants) permissions
Diagnosing Agent ID errors such as AADSTS82001, AADSTS700211, or PropertyNotCompatibleWithAgentIdentity
MCP Tools
Tool
Use
mcp_azure_mcp_documentation
Search Microsoft Learn for current Agent ID setup, Graph API shapes, and SDK configuration
There is no dedicated Agent Identity MCP server today. This skill guides direct Microsoft Graph API calls (PowerShell or Python requests). Use mcp_azure_mcp_documentation to verify request bodies and endpoints against current docs before running.
Before You Start
Use the mcp_azure_mcp_documentation tool to search Microsoft Learn for current Agent ID documentation:
"Microsoft Entra Agent ID setup instructions"
"Microsoft Entra SDK for AgentID"
Verify request bodies and endpoints against the installed SDK version — Graph API shapes evolve.
Conceptual Model
Agent Identity Blueprint (application) ← one per agent type/project
└── BlueprintPrincipal (service principal) ← MUST be created explicitly
├── Agent Identity (SP): agent-1 ← one per agent instance
├── Agent Identity (SP): agent-2
└── Agent Identity (SP): agent-3
Concept
Description
Blueprint
Application object that defines a type/class of agent. Holds credentials (secret, certificate, federated identity).
BlueprintPrincipal
Service principal for the Blueprint in the tenant. Not auto-created.
Agent Identity
Service-principal-only identity for a single agent instance. Cannot hold its own credentials.
Sponsor
A User (or Group, for Agent Identity) who is responsible for the identity. Required on creation.
Prerequisites
Required Entra Roles
One of: Agent Identity Developer, Agent Identity Administrator, or Application Administrator.
DefaultAzureCredential is not supported. Azure CLI tokens carry Directory.AccessAsUser.All, which Agent Identity APIs hard-reject (403). Use a dedicated app registration with client_credentials, or Connect-MgGraph with explicit delegated scopes.
Use the typed endpoint. Sponsors must be Users at Blueprint creation. This snippet assumes the requests client and headers dict from the Python authentication block above.
Mandatory. Creating a Blueprint does NOT auto-create its service principal. Skipping this step produces:
400: The Agent Blueprint Principal for the Agent Blueprint does not exist.
Agents authenticate at runtime using credentials configured on the Blueprint (not on the Agent Identity — Agent Identities can't hold credentials).
Option
Use case
Credential on Blueprint
Managed Identity + WIF
Production (Azure-hosted)
Federated Identity Credential
Client secret
Local dev / testing
Password credential
Microsoft Entra SDK for AgentID
Polyglot / 3P agents
Sidecar container acquires tokens over HTTP
For the two-step fmi_path exchange (parent token → per-Agent-Identity Graph token) that gives each agent instance a distinct sub claim and audit trail, see references/runtime-token-exchange.md.
For .NET services, use Microsoft.Identity.Web.AgentIdentities — it handles Federated Identity Credential management and the two-step exchange for you. See the package README at github.com/AzureAD/microsoft-identity-web under src/Microsoft.Identity.Web.AgentIdentities/.
Granting Permissions (Per Agent Identity)
Agent Identities support both application permissions (autonomous) and delegated permissions (OBO). Grants are scoped per Agent Identity, not to the BlueprintPrincipal.
Application permissions (autonomous)
graph_sp = requests.get(
f"{GRAPH}/servicePrincipals?$filter=appId eq '00000003-0000-0000-c000-000000000000'",
headers=headers,
).json()["value"][0]
user_read_all = next(r for r in graph_sp["appRoles"] if r["value"] == "User.Read.All")
requests.post(
f"{GRAPH}/servicePrincipals/{agent_sp_id}/appRoleAssignments",
headers=headers,
json={
"principalId": agent_sp_id,
"resourceId": graph_sp["id"],
"appRoleId": user_read_all["id"],
},
).raise_for_status()
Browser-based admin consent URLs do not work for Agent Identities — use oauth2PermissionGrants for programmatic delegated consent.
Cross-Tenant Agent Identities
Blueprints can be multi-tenant (signInAudience: AzureADMultipleOrgs). When exchanging tokens cross-tenant:
Step 1 of the parent token exchange MUST target the Agent Identity's home tenant, not the Blueprint's. Wrong tenant → AADSTS700211: No matching federated identity record found.