Short answer: To properly audit and revoke an AI agent’s access to user data, each agent connection needs its own revocable identity, not a shared credential. When every agent request is tied to a connection_id the user controls, you get a real audit trail and targeted revocation. Most current API-key and MCP deployments don’t offer this. A 2026 survey of 235 large-enterprise security leaders, summarized in a Cloud Security Alliance research note, found that 92% lack full visibility into their AI agent identities.
Watch: how to audit and revoke an AI agent’s access in 34 seconds
Transcript: On a shared key, every agent looks the same. Remove one, and you rotate the key everyone else runs on. With AgentAdmit, each connection has its own identity, and each call is logged against it. Revoke one connection, or one agent product across all your users. No key rotation. A user can end their own connection too, and the next call is refused.
What is the attribution gap in AI agent access?
Okta’s Kundan Kolhe named this problem in a post the Cloud Security Alliance republished in May 2026: “The attribution gap is the distance between what an agent did and your ability to prove who authorized it and what it was permitted to do.” Most enterprises cannot close that gap today.
The numbers are stark. In a 2026 survey of 235 large-enterprise CISOs and CIOs (the Cybersecurity Insiders CISO AI Risk Report, cited in a CSA research note), 92% lack full visibility into their AI agent identities and 95% doubt they could detect or contain a compromised agent. The gap sits in authorization infrastructure more than in logging: a log can’t record an identity nobody tracked.
When an agent runs under a shared API key, the access log shows which key was used and when. It doesn’t show which agent used it, what the user intended to authorize, or which agent to disconnect if something goes wrong. The credential belongs to whoever holds the string, not to a specific authorized agent doing a specific job.
Why can’t you just revoke an API key?
You can. But it’s a sledgehammer. A static API key doesn’t belong to one agent. It belongs to every integration using that string. Rotating or revoking the key kills all of them.
Astrix Security’s 2025 scan of more than 5,200 MCP server implementations found that 53% rely on static API keys or personal access tokens. Only 8.5% use OAuth. Static keys dominate because they’re fast to set up. The problem is that “revoke one agent” and “rotate the key” are the same operation. There’s no in-between.
Standards-based authorization flows improve on this. But most production deployments still don’t give each AI agent its own named, revocable grant. When the agent’s token is bound to the user’s session rather than to a specific connection, revoking “the agent” means disrupting the user’s broader access. That’s not surgical revocation. It’s collateral damage.
What does a proper agent audit trail actually log?
A useful audit trail records five things on every request: timestamp, which connection identity made the call, which scope was exercised, which resource was accessed, and what the outcome was.
The critical piece is “which connection identity.” Without a per-agent connection_id, the timestamp and scope tell you what happened but not who authorized it or which agent is responsible. The attribution gap isn’t a logging gap. It’s the missing link between the action and the authorization that permitted it.
Per-call mandatory introspection closes the loop. Rather than validating the token once at login and trusting it until expiry, the resource server checks the token’s live status on every request. If a connection is revoked mid-session, the next introspection call returns invalid and access stops at the next call, not at some future expiry date.
This matters practically. An agent that made 400 API calls over three days leaves a record indexed by connection_id: the scope, resource, and timestamp of each verified call. You can audit that agent’s behavior independently, without sorting through every call made under a shared key during the same window.
How does per-connection revocation actually work?
The user-mediated authorization model issues each agent authorization as a distinct connection identified by a connection_id. That connection carries the user’s chosen scopes, the authorized duration, and a revocation handle the user holds directly.
When the user revokes a connection, the server invalidates the connection_id. Because introspection runs on every call, revocation takes effect at the agent’s next request. There’s no waiting for a 30-day token to roll over. There’s no rotating a shared key that breaks other agents. The user revokes one connection. That agent stops. Everything else keeps running.
The app owner has the same control from the other seat. The revoke API accepts a single connection_id, every connection for one user_id, or every connection users granted to one agent, each in a single call, while every other connection keeps working. The agent is the one each user picked on the consent page, from the list the app owner keeps, when they granted access (designated_agent_id). It is the user’s declaration, signed with their passkey where the app requires presence, and not a verified identity of the agent. The agent can’t set or change it. Revoking every connection in an app takes an explicit confirm_app_wide flag, so a typo can’t escalate a scoped revoke. API keys are environment-scoped, so a test key can’t revoke live connections.
Scope enforcement makes this cleaner still. Each connection carries explicit scopes in the action:resource format. An agent authorized to read a user’s activity data can’t call a write endpoint with the same connection. A refused call carries a required_scope field naming exactly what was missing, and the denied attempt lands in the audit log. Getting the scope takes a new user-mediated grant, so the agent can’t widen its own access.
Why no refresh tokens is a security feature
Most authorization systems issue refresh tokens so agents can keep running after the access token expires. The convenience is real. So is the risk.
A refresh token can silently extend an agent’s access long after the user has forgotten about the connection. “This agent has been accessing my data for eight months on a refresh token I issued in January” is a real scenario. The user didn’t revoke it because they didn’t know it was still running. The agent didn’t ask for re-authorization because it didn’t need to.
User-mediated authorization doesn’t issue refresh tokens. The user picks the duration when granting access, from the options the app offers (30 days when the app sets none, and the options can include “Until I Revoke”), so a grant ends at the expiry the user chose or at revocation, whichever comes first. When a fixed duration runs out, the agent’s access ends and the user has to complete a new authorization flow to reconnect. The user sees the agent again, confirms the connection is still wanted, and can adjust scopes or duration. Expiry becomes a natural audit checkpoint rather than an inconvenience to be designed around. For open-ended grants, the revoke control is the checkpoint.
What does this look like in practice?
A user starts connecting an AI agent from inside the app, in their own signed-in session. On a consent page that AgentAdmit hosts on the app’s behalf, they say which agent the connection is for, pick the scopes and duration, and confirm. A single-use Connection Token is shown to the user there, not sent to the agent. The user gives the token to their agent. The agent exchanges it for a scoped Access Token and gets back the endpoints it’s permitted to call, with descriptions of the request fields where the app has registered them.
Every subsequent request is checked at the introspection endpoint, and AgentAdmit records each check: timestamp, connection_id, scope, resource, action, and status. The app owner sees these records in the dashboard logs, and an app can show a user their own connections’ activity on its Agent Access page. If the user wants to end access, they revoke the connection. The agent’s next request returns invalid.
No shared credential. No inherited session. No refresh token keeping access alive past the user’s awareness. The user stays in control, the audit trail is clean, and revocation is real-time.
The attribution gap post describes the failure this way: “An agent acts. A human is harmed. The enterprise cannot produce a trail showing who authorized the agent, what it was permitted to do, or how to attribute its actions to a responsible human.” A per-connection identity is what makes that trail possible to produce.
FAQ
How is per-connection revocation different from standard token revocation?
Many standard flows issue tokens tied to a user session rather than to a specific agent connection. Revoking the session stops all agents using it. Per-connection revocation stops just the one agent while leaving other authorized connections active. This matters when a user runs multiple agents against the same app and wants to remove one without disrupting the others.
What happens if an agent’s access is revoked while it is mid-task?
Because introspection runs on every API call, revocation takes effect at the next request. The agent’s current call may complete, but the next request returns an invalid response and the agent stops. The user’s data is protected from the next request forward, without needing to interrupt the agent’s process directly.
Can a user see what an AI agent did before revoking it?
Yes, where the app shows it. Every verified request is logged against its connection_id, and an app can surface those records on the page where the user manages connections. They show permission checks (what was asked, when, under which scope, and the verdict), not proof that an action completed. Revocation shouldn’t be a blind action. Users who can see what an agent did are in a much better position to decide whether to revoke it, restrict it, or let it continue.
How does mandatory introspection differ from standard token validation?
Standard token validation checks whether a token is structurally valid when the agent first connects. Mandatory introspection checks the token’s live status on every API call. If a connection is revoked after the agent has already authenticated, standard validation misses it until the token expires. Mandatory introspection catches it on the next request, making revocation real-time rather than eventual. The cost is one additional round-trip per call; the benefit is that revocation actually means something.
What should I look for when choosing an authorization layer for AI agent integrations in my app?
Per-connection identity (each agent gets its own revocable grant, not a shared credential), mandatory introspection on every request, explicit scope logging per call, and revocation that takes effect immediately rather than at token expiry. If the system issues long-lived static credentials or refresh tokens for agent continuity, it’s trading security for convenience in a way that’s hard to reverse when something goes wrong.
AgentAdmit is the auth layer for the agent economy. It gives apps a user-mediated, per-connection, auditable, and revocable way to authorize agents. Learn more at agentadmit.com.
Related: How to let an AI agent access a user’s account safely | What is user-mediated authorization for AI agents? | Prompt injection is an authorization problem, not just a model problem | AI agent authorization vs API keys: what’s the difference?
Run an app or an MCP server? Create an AgentAdmit account and build in Test Mode with a test key.