Home โ€บ Blog โ€บ Identity and permissions
Inside the Agent Layer ยท Part 5 ยท Identity

On Whose Behalf? Identity and Permissions for AI Agents

When an agent files an expense, reads a customer record or merges code, three questions must have clear answers: which agent did it, for which person, and was it allowed? Today's identity systems were built for two kinds of actor: people who log in and services that run with fixed keys. Agents are neither. They act for a user, often across many apps, with permissions that should be narrower than the user's and last only as long as the task. This part explains how identity for agents is being built: delegated tokens, MCP authorization, agent directories, and the least-privilege rules that keep a hijacked agent from doing much harm.

FL
FrontierAGI Team
โš ๏ธ How to read this (as of 28 Oct 2026) Standards described here (OAuth 2.1, token exchange, MCP authorization) are still moving; OAuth 2.1 is an IETF draft. Product status for Microsoft Entra Agent ID and Okta Cross App Access is from vendor documentation and third-party guides; check current docs before relying on a feature. The token example and permission builder are our illustrations.

1. Case file

๐Ÿชช
Agent identity, October 2026Part 5 of the agent layer
MCP authorization (rev. 2025-06-18)MCP server is an OAuth resource server; tokens issued by a separate identity provider
Token passthroughDiscouraged by the spec: servers must not forward client tokens downstream
Microsoft Entra Agent IDAgents as directory identities; generally available (Microsoft docs)
Okta Cross App AccessAgent access across enterprise apps without repeated consent; early access โš ๏ธ
Core patternToken carries the user as subject and the agent as actor

2. Why agents break identity

They act for someoneA service account acts as itself. An agent acts for a specific user, and the audit log must say both.
They cross appsOne task may touch email, a CRM, a code host and a database, each with its own login and consent screen.
They can be steeredA prompt injection can make an agent use its access for someone else's goal. Broad standing permissions turn a manipulation into a breach.
They multiplyAgents spawn sub-agents and run in parallel; each needs its own identity, lifetime and scope.

3. Three ways to give an agent access

ModelHowProblem
Shared keyPaste an API key or the user's password into the agent's configNo record of which actions were the agent's; key often has full access and never expires; leaks into context or logs
Agent as a service accountThe agent gets its own fixed credentialsActs as itself, so it can see data the user cannot (the confused deputy); one identity for every user
Delegated, scoped tokensThe user authorises the agent via OAuth; the agent gets short-lived tokens naming both user and agent, limited to specific scopes and resourcesMore moving parts, but this is where standards are heading

4. Anatomy of a delegated token

What the resource sees

A simplified access token for an agent acting for a user, in the style of OAuth token exchange (RFC 8693). Toggle to compare. Our illustration.

The key fields: sub (the user), act (the agent acting for them), aud (the one resource the token is valid for), scope (what it may do) and a short exp. Microsoft describes an agent-aware on-behalf-of flow in Entra along these lines, keeping the user as subject and naming the agent in actor claims; resources can then apply both the user's and the agent's policies.

5. MCP authorization

For remote MCP servers over HTTP, the June 2025 revision of the MCP specification made the roles explicit: the MCP server is an OAuth resource server that validates tokens, while a separate authorization server (the company's identity provider) issues them. Servers publish metadata (RFC 9728) so clients can discover where to log in; tokens are bound to a specific server with resource indicators (RFC 8707), so a token for one server cannot be replayed against another. The spec also says a server must not simply pass the client's token through to downstream APIs, the pattern behind confused-deputy bugs. Later revisions adjusted client registration. Local servers running over standard input and output still take credentials from their environment, which is why sandboxing them (Part 2) matters.

6. Agent directories

Enterprises already manage people and apps in a directory; agents are being added as a third kind of entry. Microsoft Entra Agent ID registers agents as identities in the directory, so existing tools (conditional access, sign-in logs, lifecycle and ownership) apply to them. Okta's Cross App Access protocol lets an identity provider broker an agent's access from one enterprise app to another without the user clicking through consent screens app by app, with IT controlling which connections are allowed. Its standardisation work is known as ID-JAG. Within one Microsoft tenant, on-behalf-of tokens cover the case; across vendors, brokering of this kind or per-user OAuth is still needed. The direction is the same everywhere: every agent has an owner, a lifecycle and logs, just like an employee account.

7. Least privilege in practice

Build a permission set for a support agent

Tick what the agent may do. Our risk scoring: what could a hijacked agent do with this set?

Scope per taskGrant only the scopes this task needs, for minutes or hours, not standing access.
Never exceed the userAn agent acting for a user should never see more than that user can.
Step-up for risky actionsPayments, deletions and external messages need a fresh human approval, ideally on a separate channel.
Keep secrets out of contextTokens are injected by the gateway (Part 4), never shown to the model.
Log both identitiesEvery action records user and agent, so audits and incident response can answer "who did this?" (Part 7).

8. The series

Inside the Agent Layer: eight parts

VerdictAgents need their own identities that always carry the user they act for: short-lived, narrowly scoped, bound to one resource, logged on both names. Pasted keys and all-powerful service accounts are how agent incidents become breaches. The standards (OAuth token exchange, MCP authorization, cross-app access) are converging, though not finished. Next, what an agent remembers between steps and sessions: Part 6, memory and state.

9. Reading the numbers

Primary
MCP authorization specification (2025-06-18 revision and later). Microsoft Entra Agent ID documentation. OAuth token exchange (RFC 8693), resource indicators (RFC 8707), protected resource metadata (RFC 9728).
Secondary โš ๏ธ
Okta Cross App Access availability and the Entra on-behalf-of details (third-party integration guides).
Our illustrations
Token example, permission builder and risk scores.