Microsoft Entra Agent ID explained: Blueprints, autonomous agents and impersonation
What is Microsoft Entra Agent ID? Follow a helpdesk agent through blueprints, three access patterns and the token claims your API uses to tell them apart.

Overnight, your helpdesk agent sorts the open tickets. In the morning, an employee asks it about HD-1042. Same agent, same ticket API. Should the overnight job have the same access as the employee has in the morning? I would decide that before giving the agent access to its first ticket.
1. What is Microsoft Entra Agent ID?
The Agent ID is the agent’s identity in Microsoft Entra. It’s a special type of service principal: a directory object you can grant access to. Our helpdesk agent can read the support queue. It can only close tickets if you grant that permission too. The model, prompt, and code stay wherever the agent runs.
The agent identity blueprint is the template for Agent IDs. It defines how agents authenticate. The instance mode determines how many Agent IDs a blueprint can have:
- Multi-instance · 1:N: One blueprint can have several Agent IDs in the same tenant. For example, ticket triage and billing share authentication settings, but each has its own Agent ID and can receive different permissions. Each Agent ID belongs to exactly one blueprint.
- Single-instance · 1:1: The blueprint has one Agent ID per tenant. They share an OAuth client ID and remain separate directory objects.
In multi-instance mode, the blueprint principal represents the blueprint in that tenant. That’s where you can see which permissions the tenant granted to the blueprint.
2. Three ways an agent can access a resource
The morning request and the overnight job can use the same Agent ID. What changes is the identity that the access token represents to the ticket API. Here’s how I’d choose for the helpdesk:
- Autonomous application (app-only): Overnight, the agent reads the queue as itself. If the API supports application permissions, this is where I’d start for an unattended job. No user account is needed.
- Delegated access on behalf of a person (On-Behalf-Of): In the morning, an employee asks about
HD-1042. The agent calls the API on her behalf. The API checks both the agent’s delegated scope and her access to that particular ticket. - Autonomous access with an agent user account: Later, the agent gets its own Exchange mailbox. That requires a user object. The agent can act as its own account without an employee signing in. The account is linked to its Agent ID and only gets access to the resources assigned to it.

An autonomous agent can still authenticate through an impersonation flow. To understand what that means, look at which identity is acting as which.
3. What happens during impersonation
Triage and billing can run in the same environment. When triage reads tickets overnight, the API should still see only the triage Agent ID. Here’s the app-only flow in three steps:
- Authenticate as the blueprint. The runtime authenticates to Entra as the blueprint and requests an exchange token for the triage Agent ID.
- Exchange the token. The triage Agent ID uses the exchange token to request an access token for the ticket API. Entra checks that the exchange token is bound to the blueprint and to that specific Agent ID.
- Call the ticket API. Only the resulting access token goes to the API. In this app-only example, the triage Agent ID is both the actor and the subject.
In single-instance mode, the Agent ID requests an access token directly with the shared client ID. There’s no exchange step. Microsoft currently lists the instance modes as preview.
When the agent uses its own user account, there’s a second kind of impersonation: the Agent ID acts as its assigned account. The first exchange answers Which Agent ID is calling? This one adds Whose identity does the call represent? The token calls these the actor and the subject.
Where do managed identities and Agent 365 fit?
If the helpdesk agent runs on Azure, a managed identity can serve as a federated credential for its blueprint. The ticket API still sees the Agent ID in the flow we’re looking at. Permission to read the queue is a separate grant.
Agent 365 is the management layer, including the organization-wide inventory. Entra Agent ID supplies the identity used to access resources. I’d look in the Agent 365 inventory to see who looks after an agent. To learn whose access applies to a ticket, I’d check the token and the API’s authorization decision.
4. Three access tokens for the same agent
At 2 a.m., the agent reads the ticket queue with its own user account. Its access token says idtyp: user, even though no employee signed in. When the agent opens a ticket for an employee the next morning, the token says user again. You have to read the other fields to tell which user it means.
Let’s compare three access tokens for the same fictional ticket API: app-only, on behalf of an employee, and with the agent’s own user account. The JSON uses fictional IDs, not tokens captured from a tenant.
A signed JWT has a header, payload, and signature, separated by dots. The header includes the algorithm and, in this case, the key ID (kid). The payload contains the claims. Reading those fields tells you what the token says. Before trusting them, the API verifies the signature against a trusted key and checks the issuer, audience, and lifetime. Your client treats access tokens for Microsoft Graph as opaque. The ticket API only interprets access tokens issued for itself.
An illustrative header for the first payload looks like this:
{
"typ": "JWT",
"alg": "RS256",
"kid": "demo-key-not-valid"
}
The middleware finds the matching signing key in trusted issuer metadata. In a payload, nbf and exp mark the beginning and end of the validity window in Unix seconds; iat records when the issuer created the token. For directory lookup I use oid. Microsoft describes sub as a pairwise subject identifier, so it can differ between apps for the same identity.
The payloads below are abbreviated. All three have the same Agent ID client ID in azp and the same ticket API in aud. Roles and scopes such as Tickets.Queue.Read belong to this fictional API, not Microsoft Graph.
A. The agent reads the queue as an application
The overnight job needs read access to one queue. The API defines Tickets.Queue.Read.Allowed as an application role. The API also checks which queue this Agent ID can read.
{
"ver": "2.0",
"iss": "https://login.microsoftonline.com/10000000-0000-4000-8000-000000000001/v2.0",
"aud": "20000000-0000-4000-8000-000000000001",
"tid": "10000000-0000-4000-8000-000000000001",
"nbf": 1796194800,
"exp": 1796198400,
"azp": "30000000-0000-4000-8000-000000000001",
"oid": "40000000-0000-4000-8000-000000000001",
"idtyp": "app",
"roles": ["Tickets.Queue.Read.Allowed"],
"xms_act_fct": "3 11",
"xms_sub_fct": "11 3",
"xms_par_app_azp": "50000000-0000-4000-8000-000000000001"
}
Here oid belongs to the agent’s service principal. azp is its application ID, not its object ID. A v1 token uses appid for the actor. In this example xms_par_app_azp identifies the blueprint’s application ID. That is useful for tracing the actor back to its blueprint during an investigation. I would keep the parent ID out of the allow rule: approving the parent would let multiple child agents pass that check. Agent ID token claims
B. The agent reads a ticket on behalf of an employee
The employee signs into the helpdesk app and asks about HD-1042. In Microsoft’s multi-instance OBO flow, the app brings the user access token Tc, issued for the blueprint. The blueprint also gets exchange token T1, bound to the selected Agent ID.

The Agent ID presents Tc and T1 to Entra and gets TR, a new access token for the ticket API. Neither the original user token nor T1 goes to that API. Even with a valid TR, the API still decides whether the employee can read HD-1042.

Christian Posta asks a useful question here: who acted, and for whom? Our API can log both separately: the Agent ID as actor and the employee as subject. That tells us whose access applied. It doesn’t prove the employee chose every individual tool call.
{
"ver": "2.0",
"aud": "20000000-0000-4000-8000-000000000001",
"tid": "10000000-0000-4000-8000-000000000001",
"azp": "30000000-0000-4000-8000-000000000001",
"oid": "60000000-0000-4000-8000-000000000001",
"idtyp": "user",
"scp": "Tickets.Read",
"xms_act_fct": "11",
"xms_par_app_azp": "50000000-0000-4000-8000-000000000001"
}
The oid now belongs to the employee. The scp claim contains a delegated permission for the client. The API still checks whether this employee can read HD-1042. If the next ticket belongs to a different team, the same valid token can get a 403. Give the right to invoke the agent and the right to read a ticket separate authorization checks.

C. The agent runs unattended with its own user account
Suppose the helpdesk agent has its own mailbox. It processes an incoming message and calls a queue function on the ticket API that requires a user context. In this example, the service grants queue access to the agent’s user account.
{
"ver": "2.0",
"aud": "20000000-0000-4000-8000-000000000001",
"tid": "10000000-0000-4000-8000-000000000001",
"azp": "30000000-0000-4000-8000-000000000001",
"oid": "70000000-0000-4000-8000-000000000001",
"idtyp": "user",
"scp": "Tickets.Queue.Read",
"xms_act_fct": "11",
"xms_sub_fct": "13",
"xms_par_app_azp": "50000000-0000-4000-8000-000000000001"
}
As in B, idtyp is user. This time oid is the directory object ID of the agent’s user account. The subject facet xms_sub_fct contains 13 for the account; the actor facet xms_act_fct contains 11 for the Agent ID. The facet claims are optional and can contain multiple space-separated values. Check individual values instead of comparing the entire string. Missing 13 does not prove that the subject is a person. If your endpoint requires an agent user account and cannot positively establish that identity type, reject the request.
Mailbox access is a separate authorization decision. This token is for the ticket API, so it cannot read mail through Graph. Creating the account also grants no automatic access to other mailboxes or tickets.
5. What the ticket API checks on a request
I would hand signature verification and the standard JWT checks to an established framework such as Microsoft.Identity.Web. For GET /queues/helpdesk, the application then needs a policy for the access path it expects.
- Tenant and actor: The verified
tidmust match the queue’s tenant. For an internal agent, also require the approved Agent ID client ID fromazporappid. Display names, UPNs, and email addresses are not authorization keys. - App-only: Require
idtyp: app, the exact application role, and a service principal authorized for that queue. Arolesclaim on its own does not prove app-only context: user tokens can also contain roles. - Delegated: Require the scope for the operation and check the subject against the ticket or queue ACL. I would use
(tid, oid)as the key. For a dedicated agent user path, check the subject type and, if the endpoint expects one specific account, its object ID. Match individual scope names rather than substrings.
An invalid token, including one for the wrong audience or outside its lifetime, should get 401. A valid token with the wrong actor, subject, or permissions should get 403. I would test these separately. A 200 with the intended agent says nothing about whether the API rejects a second Agent ID under the same blueprint. Validate claims
In the API log, retain the time, route, outcome, your request ID, and the verified identity fields you need. For this case I would start with tid, actor client ID, subject object ID, subject type, and parent application ID when present. Add a decision reason such as scope_missing or subject_not_assigned. Leave the bearer token and ticket contents out. Entra sign-in logs help identify the agent and the context in which it authenticated. Check the API or workload logs to see what the request actually did.
When the agent calls another tool
So far the helpdesk agent has called the ticket API directly. Imagine it now calls a separate ticket tool. The tool can’t simply forward the token it received: that token is for the tool. The ticket API expects a token with its own audience.

This separate example shows how an issuer can represent that chain with OAuth Token Exchange under RFC 8693. The outer act identifies the current actor. A nested act records a prior actor for context and grants no permissions. Don’t assume those claims appear in the Entra OBO example above.
6. BluePhishing: What I would check in the tenant
In November 2026, Proofpoint published BluePhishing, a research demonstration of how consent abuse involving a third-party agent identity blueprint could provide access to a tenant. Proofpoint reported no in-the-wild activity when it published the analysis. The lab used legitimately issued tokens. For defenders, the useful questions are where the blueprint came from and what identities and grants appeared after the consent. Proofpoint’s BluePhishing analysis
I would date one detail in the incident runbook. Proofpoint observed an implicit creation permission on the blueprint principal in its test. The Microsoft documentation I checked now describes AgentIdentity.CreateAsManager as an explicit, revocable administrator grant. Do not assume that every tenant today behaves like the research setup or that existing grants disappeared. Check the actual grants in your tenant.
Start with the consent event and identify who approved the tenant’s blueprint principal. Then map the child Agent IDs and compare their creation times with audit and sign-in events. Review direct grants, app role assignments, and inheritance separately. The requiredResourceAccess manifest field describes requested permissions; it does not prove a grant. For inherited delegated scopes, Microsoft requires a resource configured for inheritance and a grant on the blueprint principal. Do not assume that all application roles are automatically inherited. Inheritable permissions
Review two controls independently: who can create internal blueprints, and who can grant consent to external apps or blueprints. Restricting creation does not replace the consent policy. In an active incident, preserve evidence and coordinate containment of the affected blueprint, child Agent IDs, and grants with your incident response team. Use workload logs to establish what resources were accessed. My walkthrough on blueprint creation and consent shows how I would restrict these grants up front.
Before rollout: Add a second agent to the test
In your demo environment, use an approved helpdesk Agent ID and a second Agent ID under the same blueprint with no queue access. Verify that only the helpdesk agent can read the queue. Then test a delegated employee call and a call as the agent’s user account separately. For each test, record the expected response, actor ID, subject ID, and allowed or denied resource. That is the evidence I would want before releasing a ticket API.