AI Agent Identity: Why a Shared API Key Doesn't Scale
How a downstream service learns who an agent is really acting for, and why RFC 8693 token exchange beats one shared credential.
AI-drafted, reviewed by Muhammad Qasim Hammad on August 25, 2026. See our AI disclosure.
Table of contents
- What does it mean for an AI agent to have an identity?
- Why does one shared API key break down once more than one person uses the agent?
- What is the difference between the agent's own identity and a delegated identity?
- How does OAuth 2.0 Token Exchange (RFC 8693) actually express delegation?
- What does delegated authentication look like in production right now?
- Where do MCP, A2A, and vendor identity platforms fit into this?
- Does this agent need delegated identity, or is a service account enough?
- What should you set up this week?
An agent reads your calendar, drafts a reply, and books a meeting room, all inside one workflow. When the room-booking API logs that request, what does it actually record? Most setups answer with one flat fact: a service account named agent-bot made the call. Not you, not the teammate who triggered it, just the bot. AI agent identity and delegated authentication is the layer that closes that gap: proving which human an agent is really acting for, not just that some agent called the API.
What does it mean for an AI agent to have an identity?#
An AI agent having an identity means a downstream system can name the specific actor behind a request, separate from whether that actor is allowed to do it. Today most agents skip this entirely: they inherit one static credential, and every call looks identical whether a human approved it or a prompt injection triggered it.
That distinction, identity versus authorization, is not academic. Scoped credentials and sandboxing cap what an agent can reach once it acts. Identity is the layer underneath: which actor is behind this specific call, and on whose authority. A perfectly scoped credential is still anonymous the moment it fires if nothing records who it was scoped to that day. Security teams have started calling this whole category non-human identity, credentials that belong to a workload instead of a person, and agents are the fastest-growing member of that category in 2026.
The numbers above are not about this site's own agents. They are published research on the wider MCP and agent ecosystem, and they explain why the identity gap is still the default setup in mid-2026, not a rare misconfiguration.
Why does one shared API key break down once more than one person uses the agent?#
A single API key or service account covering every user means every call is indistinguishable from every other call. You cannot see which person triggered a bad action, cannot revoke one person's access without cutting off everyone sharing the key, and cannot apply a per-user rate limit because the downstream system only ever sees one caller.
This is not hypothetical. A 2025 analysis of over 5,200 public MCP server implementations found 88% require some credential, but 53% rely on long-lived static API keys or personal access tokens, and only 8.5% use OAuth at all. Source That is the shared-secret pattern at scale: most agent tooling today cannot tell one caller from another even if it wanted to.
Security researchers have a name for the failure mode this invites: a confused deputy, a program holding broad authority that a less-trusted input tricks into misusing it. It is a decades-old access-control concept, not a new one, and an agent holding one static, over-broad credential is a textbook case. Narrowing that credential to a specific, verifiable actor is the difference between a contained mistake and a shared master key walking out the door.
What is the difference between the agent's own identity and a delegated identity?#
Two different patterns both get called agent identity, and mixing them up causes real design mistakes. A workload identity is the agent's own accountable credential, like a named service account. A delegated identity carries a specific human's authority through the agent for one call, then it expires. Most production systems need both, for different calls.
Microsoft Entra Agent ID, generally available since April 2026, is built around the first pattern: every agent gets its own governed identity, with its own sign-in and audit trail, the same way an employee account works. Source That answers "which agent did this," but not "which human asked for it."
RFC 8693, the OAuth 2.0 Token Exchange standard published in 2020, defines the second pattern precisely. It separates impersonation, where the agent becomes indistinguishable from the user, from delegation, where the token's act claim keeps both identities visible: the agent is acting, and the user is who it is acting for. Source
How does OAuth 2.0 Token Exchange (RFC 8693) actually express delegation?#
RFC 8693 lets an agent trade one token for another at an authorization server's token endpoint, and it defines two JSON claims for this exact case. The act claim names who is really acting inside a token issued to someone else. The may_act claim pre-authorizes which actors are allowed to act on a given subject's behalf.
That is a meaningful difference from most access patterns teams already use. A static API key carries no identity beyond itself. An OAuth client-credentials grant proves the agent's own identity but says nothing about a human. Only a delegated token, minted per RFC 8693 or a compatible profile, carries both at once.
| Credential type | Who is visible downstream | Per-user revocation | Typical lifetime |
|---|---|---|---|
| Static API key | Nobody, only the key itself | No, rotating breaks every caller | Months to years |
| OAuth client credentials | The agent or app only | No, the whole app is the smallest unit | Hours, auto-refreshed |
| RFC 8693 delegated token | The agent and the specific user | Yes, revoke one user's grant | Minutes to hours |
Nothing here requires building a token exchange server from scratch. The next section covers a live implementation of this exact pattern shipping in production tools right now.
What does delegated authentication look like in production right now?#
It is running today, not theoretical. An emerging IETF standard called ID-JAG lets an identity provider issue a short-lived token naming the agent, the user, and the exact downstream app it is good for, built directly on RFC 8693 token exchange. As of June 2026, Okta, Claude, and VS Code shipped it as clients.
ID-JAG stands for Identity Assertion JWT Authorization Grant, an OAuth working-group draft from authors at Okta, Ping Identity, and independent contributors. Source It answers a specific gap: your identity provider and a target app both trust the same sign-in system, but have no direct trust relationship with each other.
By June 2026, apps including Asana, Atlassian, Canva, Figma, Granola, Linear, and Supabase were named among the first to accept it, alongside Okta as the identity provider and Claude and VS Code as clients requesting it. Source None of this requires a small team to write its own token-exchange server. It requires picking an identity provider and downstream apps that already speak this language, and checking whether yours do yet.
Where do MCP, A2A, and vendor identity platforms fit into this?#
MCP, A2A, and vendor identity platforms solve 3 different pieces of this puzzle, and confusing them wastes setup time. MCP's OAuth layer secures the connection between a client and one MCP server. A2A lets independent agents discover and hand off tasks to each other. Neither one, by itself, proves which human an action was for.
MCP's 2026 spec update covers that transport-level auth mechanics in full: OAuth 2.1, audience-bound tokens, protected resource metadata. It is real progress, but it stops at the MCP server's front door. A2A is a separate concern again, about one agent finding and calling another agent, not about carrying a human's identity through the chain.
If you would rather configure this than build it, Microsoft Entra Agent ID, Okta's Cross App Access, and Auth0's Auth for GenAI all package some version of workload identity plus delegated tokens behind a dashboard. None of them replace the concepts above; they just save a small team from hand-rolling RFC 8693 itself.
Does this agent need delegated identity, or is a service account enough?#
Not every agent needs full delegation, and building it where a scoped service account would do just adds complexity for no payoff. The honest test is 3 questions: is this call acting for one specific person, does it touch that person's own data or account, and can your identity provider actually mint a per-user token today?
Walk those 3 questions in order, using the flowchart above. An agent running its own scheduled report or syncing its own inbox never needs a delegated identity; a scoped service credential and a sandboxed runtime are the right layer here. An agent that reads or changes a specific person's account, files, or money is a different case, and that is exactly where a shared credential turns into the confused-deputy problem from earlier in this post.
Once delegation is the right call, pair it with a way to see what actually happened. A trace id from agent observability tells you what a run did; the delegated token's subject claim tells you whose authority it did it under. Together they produce the audit trail a shared API key can never generate on its own.
What should you set up this week?#
Pick the one integration in your stack where more than one person's actions currently funnel through a single shared credential. That is this week's task, not a full delegation rollout. Add a per-user log line first, even a manual one, so you can see the gap before you spend a weekend closing it properly.
If you are a solo builder running one agent for yourself, a single scoped credential is still the right answer, and nothing in this post asks you to add delegation you do not need yet. The moment a second person, client, or teammate starts triggering the same agent, that credential stops being a shortcut and starts being a liability with your name on it.
Start with the flowchart above on your riskiest integration, not all of them at once. The standards and the shipped examples in this post exist so a small team configures this instead of inventing it from scratch.
Frequently asked questions
What is AI agent identity?
What is delegated authentication for AI agents?
What is RFC 8693 and how does it relate to AI agents?
What is ID-JAG?
Do small teams need delegated authentication, or is a shared API key fine?
Sources
Primary references and vendor documentation used while drafting and reviewing this article.
- RFC 8693: OAuth 2.0 Token Exchange (IETF, January 2020)
- draft-ietf-oauth-identity-assertion-authz-grant-03 (ID-JAG), OAuth Working Group
- How ID-JAG helps AI agents authenticate (Nango)
- State of MCP Server Security 2025 (Astrix Security)
- Model Context Protocol: Authorization specification
- New whitepaper tackles AI agent identity challenges (OpenID Foundation)
- What is Microsoft Entra Agent ID? (Microsoft Learn)
- WIMSE (Workload Identity in Multi-System Environments) working group charter (IETF)
Written by
Muhammad Qasim Hammad is an AI agent and automation expert and the founder of Cart Gaze LLC (cartgaze.com). He builds product for the love of it: when an idea lands, a working prototype is usually running within hours, built with the same AI agents and automations he sells. He puts his own output at roughly 20× what it was before agents, and the Agentic OS behind this site is the working proof, documented in public with the tools he actually ran and what they really cost.
AI & Automation Services
Want a pipeline like this running in your business?
I'm Qasim — I design and ship AI agents and n8n automations for solo operators and small teams. Tell me what's eating your team's week, and I'll scope a fix.
Related reading
Blast Radius: Sandboxing and Permissions for AI Agents
An AI agent with real tool access is only as safe as its weakest credential and its execution boundary. This post covers the containment half of agent security: scoping every tool to its own narrow credential instead of one shared key, and running anything that executes code
Function Calling vs MCP vs Tools: Give an Agent Capabilities
You keep seeing function calling, tool use, and MCP used as if they compete. They do not. Tools are the functions, function calling is the model mechanism that calls them, and MCP is the standard that shares them across clients. Here is how the three layers stack and which to
MCP Server Security: Tool Poisoning, Rug Pulls, and Confused Deputies
Installing a community MCP server means running someone else's code with your credentials, and nothing resembling an app-store review checks it first. Here is what the research and the official spec actually document about tool poisoning, supply-chain risk, confused-deputy
Everyone's Selling AI Agent Factories. You Just Need n8n.
HPE and NVIDIA's AI Factory, NVIDIA's Vera CPU and Agent Toolkit, and NAVER's coming platform are real enterprise agent infrastructure. For a small team, they are mostly noise. Here is where the heavy stack earns its keep, and why I would still default to n8n and one API.
How to Use n8n with MCP: Client, Server, and AI Agent Setup
Your n8n AI agent can chat, but it cannot act beyond the nodes you hard-wired. The MCP Client Tool and MCP Server Trigger change that: one gives your agent a server's worth of tools, the other turns your workflows into tools Claude can call.
PII Redaction in LLM Pipelines: Strip the Names, Keep the Meaning
Every prompt containing personal data becomes 5 copies of that data: provider logs, your traces, caches, eval exports, bug reports. This is the redaction architecture that actually holds: a single boundary function, layered detectors, consistent pseudonyms like [PERSON_1] that





