↓ Skip to main content

Who Is the Agent Acting For?

A framework for carrying a person's identity through AI agents, tools and data. By Kevin Keller, December 2026.

Every AI agent rollout reaches the same question, usually late:

“When the agent reads that table, whose access is it using?”

Too often the honest answer is a shared service account, or a personal access token that someone pasted into a config file. Then row-level security filters on the wrong person, the audit log names a robot, and nobody can say what the agent was allowed to do on whose behalf.

The fix is to treat identity as a chain. A request passes through four hops on its way from a person to the data, and at every hop the next system has to know two things: who the person is, and that an agent is acting for them.

2 · App → agent

Hand-off

The agent gets its own token: this agent, for this person, with less than the person can do.

  • Standards: OAuth token exchange with an actor claim, on-behalf-of
  • Trap: an agent using the person's own token or key looks exactly like the person.

3 · Agent → tool

Tool access

Each tool or MCP server gets a token issued for it alone, under the company's policy.

  • Standards: MCP authorization, Cross App Access (XAA)
  • Trap: passing a received token on to the next API.

4 · Tool → data

Data

The data platform applies the person's policies, and knows an agent is asking.

  • Standards: row and column policies, AuthZEN for external decisions
  • Trap: a shared service account. Row filters and audit go blind.

Every hop can narrow access. None can widen it. An agent acting for a person gets at most what that person may do, cut down further to what the task needs. A design where any hop can add rights back has a hole in it, wherever the rest of the chain looks fine.

Two questions decide most designs
#

  1. Is the agent acting for a person, or on its own? A delegated agent carries the person’s identity through every hop and is recorded as an agent. An autonomous agent, such as a nightly fraud check, gets its own identity with its own ceiling. It never borrows a person’s credentials.
  2. Where is access decided, and where is it enforced? The identity provider decides who may get a token for which tool. A policy engine can decide per request. The data platform enforces on the rows and columns. These are three different jobs. Problems start when one is expected to do another’s: the identity provider sees tokens being issued, never the tool calls or the rows that come back.

Hop 1: Sign-in
#

The person signs in once, with the company’s identity provider. Everything later depends on the app holding a token it can work with. OpenID Connect gives it one. SAML doesn’t: it proves the login to the app and is then finished. Microsoft Entra ID, for example, has no flow that turns a SAML assertion into an OAuth access token. A SAML-only app therefore needs a second, silent OpenID Connect sign-in right after the first one to get a token it can pass on.

Hop 2: Hand-off to the agent
#

This is the hop most designs skip. The app has the person’s token, and the agent needs something to work with. Handing over the person’s own token, or a personal access token, makes the agent indistinguishable from the person: no ceiling, and an audit trail that says the person did it.

The standard answer is OAuth token exchange (RFC 8693). The app swaps the person’s token for a new one that names both: the person as the subject, and the agent in an act (actor) claim. The new token is short-lived and capped, and a platform that understands it can treat agent and person differently. Microsoft’s version of the same idea is called on-behalf-of.

Hop 3: Tool access
#

An agent rarely calls one system. It calls tools, more and more often through MCP servers, and every one of them needs a token. Two rules matter:

  • A token is issued for one audience. An MCP server must accept only tokens issued for itself, and it must never pass the token it received on to an upstream API. The MCP specification forbids that. To call onward, exchange the token or get a new one.
  • The company should decide, not each person. With plain OAuth, every employee approves every tool connection by hand, and security has no central view. Cross App Access (XAA) moves that decision to the identity provider. The app exchanges the person’s sign-in for a signed assertion naming one tool, the identity provider checks company policy before issuing it, and the tool’s authorization server turns it into an access token for that tool alone. MCP adopted it as the Enterprise-Managed Authorization extension. Okta, Ping and Oracle are among the identity providers listed as issuing these assertions, and Claude, VS Code and the OpenAI Codex CLI among the clients (oauth.net).

XAA closes the consent sprawl. It does not see what the agent does with a tool it was allowed to use, and it covers one hop: from the app to one tool.

Hop 4: Data
#

The last hop is where the earlier ones pay off, or don’t. If the identity has survived the chain, the data platform can do what it is good at. It filters rows with policies on the current user and masks columns by tag. It can also apply agent-aware rules: the same person sees less through an agent than in their own session.

Decisions that need more context than a role, such as purpose, the agent type or the delegation depth, can come from an external policy engine. The AuthZEN Authorization API 1.0, an OpenID Final Specification since January 2026, standardises how an enforcement point asks that engine. The data platform should still enforce: in my tests, an agent that skipped the policy gateway with a perfectly valid token got zero rows, because its authentication had succeeded but authorization hadn’t.

The hop without a standard: agent to agent
#

Agents increasingly call other agents: a planner hands work to a research agent, which calls a coding agent, which calls a tool. Each hop should narrow the rights again, and the audit trail should lead from the tool call all the way back to the person.

As of December 2026, no finished standard covers that chain. Token exchange can nest actors, XAA covers one hop, and the multi-hop proposals are individual drafts at the IETF. Meanwhile the OpenID Foundation’s AuthZEN group has a working draft for mapping MCP tool calls onto policy decisions, the COAZ-MCP Binding.

This is where I work on my own proposal. SMCP is my open-source security layer for MCP: mutual authentication, encrypted and signed tool calls and per-tool authorization, compatible with existing MCP tools. Since December 2026 it also carries delegation chains: every agent that passes work on signs a link chained to the user’s token, and each link can only narrow the permissions, tools, hop budget and lifetime it hands to the next agent. The receiving agent works with the narrowed scope, never the full token. It is the same rule as this page’s, enforced in code, with a published specification and test vectors so other implementations can check themselves against it.

Traps I hit in testing
#

Each of these came out of a build on this blog, not a thought experiment:

  • The shared service account. Row-level security filters on the robot, and the audit log names it instead of the person.
  • “Any role” tokens. In one test, a token scoped to any role left 38 secondary roles active in the session, ACCOUNTADMIN among them. A token scoped to one role fixed it.
  • The agent with a personal token. An agent that logs in as a regular user with a key pair or personal access token is not recognised as an agent, so agent-aware policies never apply.
  • The shared agent with a saved connection. Anyone who uses it acts with its owner’s access.
  • The search index that isn’t filtered. A semantic search service built over many people’s documents doesn’t apply row policies per user. One index per access domain does.
  • The identity provider as the whole answer. It decides who gets a token. It doesn’t stop a permitted agent from misusing a permitted tool.

For leadership
#

The business version is one question to ask about every agent project: “How does this agent log in?” If the answer is a service account or a pasted token, the project carries a risk that no later control fully removes.

Cite this: Keller, Kevin. "Who Is the Agent Acting For? A framework for carrying identity through AI agents, tools and data." kevinkeller.org, December 2026. https://kevinkeller.org/agent-identity/

Personal framework. The builds linked here are "art of the possible" projects, not official, reviewed or supported vendor solutions. Standards status as of December 2026.

Share this article