Enterprise-Grade, Explained · For engineers

Give every AI agent its own identity

If an agent acts with the user's token, your audit log cannot tell who acted. OAuth token exchange has the fix: delegation, not impersonation.

Short answer Give each AI agent its own client identity and a delegated token: user as subject, agent as actor (RFC 8693's act claim), narrow scope, short lifetime. Log both identities, down-scope at every hand-off, and never pass one tool's token to another; MCP binds each token to one server.

Look at the audit log of any app where an AI agent works for your users and ask one question of each row: did the user do this, or the agent? Often you cannot tell. The OpenID Foundation's whitepaper on agent identity puts it bluntly: an API call made by an agent on a user's behalf is often logged indistinguishably from an action taken directly by the userSource 1. The paper calls that an accountability gap and a security riskSource 1.

That is a design choice, usually made by accident, and there are three common versions of it.

Three ways an agent gets access, and what each leaves behind
PatternWhat the agent holdsWhat the log can tell you
ImpersonationThe user's own session or tokenThe user did it, even when the agent did
Shared service accountOne API key for every agent and userSome agent did it, for someone
DelegationA token for this user, naming this agent, with limited scopeThis agent did it, for this user
§1

Delegation, in one claim

OAuth already has the vocabulary. RFC 8693, OAuth 2.0 Token Exchange, separates the two ideas: with delegation, the acting party keeps its own identity, and it is explicitly understood that it acts as an agent for someone else; with impersonation, it does notSource 2. The token records this in the act (actor) claim, which expresses that delegation has occurred and identifies the acting partySource 2. A token whose sub is the user and whose act is {"sub": "agent:support-bot"} says exactly what your audit log needs to know. To get one, the agent sends the user's token as subject_token and its own credential as actor_token in the exchange requestSource 2. Whether the server issues a composite token naming both is up to the authorization server and its policySource 2, so check that yours supports it.

Token exchange also handles the next problem. When an agent hands work to a sub-agent, it can ask the authorization server for a down-scoped token for that sub-agent, which the OpenID Foundation paper names for centrally managed systems: it centralizes policy control and simplifies revocation, at the cost of latencySource 1. Nested act claims keep the chain: the outermost actor is the current one, and the nested ones are a history trailSource 2.

§2

Where MCP fits

If your agents reach tools through MCP over HTTP with authorization enabled, the specification points the same way. The client must not send a server any token except one issued by that server's authorization serverSource 3, and the server must check that the token was issued specifically for it and must not accept or pass on any other tokenSource 3. So a token the agent holds for one tool cannot be passed through to another. MCP stops there: it has no actor claim, so the delegation itself comes from your authorization server. Our post on MCP servers and database roles covers the database side of the same principle.

§3

What to do this quarter

  1. Register each agent as its own client. One identity per agent, not one API key for all of them. The OpenID Foundation paper notes that identity vendors have started to treat agents as first-class entities, because a traditional service account does not fit an agent's lifecycle and governance needsSource 1.
  2. Issue delegated tokens, not the user's. Subject is the user, actor is the agent, scope is what this task needs, lifetime is short.
  3. Log both identities on every action. "user 42 via agent:support-bot" is the row you will want during an incident.
  4. Down-scope at every hand-off. A sub-agent gets a token no wider than its caller's, scoped to its own task, never the same one.
  5. Ask a person for high-risk actions. Refunds, deletions and messages to customers wait for an approval that is also logged.

None of this needs a new standard. It needs the decision that an agent is not the user, made before the first agent ships rather than after the first incident.

Sources

  1. Identity Management for Agentic AI (OpenID Foundation whitepaper, Oct 2025). Retrieved . ↩ ↩ ↩ ↩
  2. RFC 8693: OAuth 2.0 Token Exchange. Retrieved . ↩ ↩ ↩ ↩ ↩
  3. Authorization (Model Context Protocol specification, 2026-07-28). Retrieved . ↩ ↩

Published · Updated Report an error (support@agentum.cloud)