Agents Have an API Authorization Problem Posted in Security Jacob Ideskog December 3, 2026 The goal is not to take away agentic access, but to govern it with runtime guardrails The utility of AI agents is growing by the minute: they can now perform multi-step workflows and work autonomously across apps. To get that power they’re being granted a near-endless stream of long-lived permissions. But should agents really have unlimited access to all the data, endpoints, and sensitive functions? Under the hood, agents have growing MCP server and API access. Most MCP users have two to seven servers configured, and the median server exposes five tools. 76.8% of organizations have agents that string actions together across other agents, tools, and APIs, found Salt Security. To bring better security practices, the growing industry around agentic AI continually talks about authentication, which is great for confirming who or what something is. But it’s missing the underlying flaw: API authorization. So many of the agent permissions out there are long-lived and incredibly broad. Without granular, time-bound, API-level authorization for agentic AI, you get overprivileged access that breaks a least privilege model. In this environment, destructive, unintended consequences are inevitable. As such, it’s imperative to add guardrails around API authorization. Not to take away agentic access, but to govern it with runtime guardrails for API authorization. Authentication is a moment. Authorization is a process. In this article 7 min readThe Problem: Guardrails Are Too SoftWhat Can Go Wrong: When Authorization Is MissingThe Answer: Runtime Authorization for AgentsIn Practice: An Agent-Driven API WorkflowPrompts Aren’t Enough, Security Must Go DeeperThe Problem: Guardrails Are Too Soft Non-human identities are exploding throughout enterprise software. One 2026 study from Palo Alto Networks found that machine identities now outnumber human identities 109 to 1, and AI agents are a growing share of them. But too often, these agentic identities rely on soft guardrails. Soft guardrails can be thought of as telling an agent “don’t touch customer data” or “don’t deploy to production.” This might be inserted into the prompt or live in the agent’s harness as context. However, agentic AI is nondeterministic and unpredictable, and can easily violate these boundaries. This might occur unintentionally or through malicious prompt injection. Hard guardrails, on the other hand, literally block agents when they attempt to access resources they don’t have permissions for. A hard guardrail should prevent an agent from accessing certain endpoints or methods. This can be accomplished by issuing narrowly scoped, short-lived access grants through tokens that are enforced at the API layer. Short-lived scopes grant a hard guardrail because they constrain what an agent can do on someone’s behalf, even across multi-hop calls. Hard authorization decisions should also be contextually dependent, task-specific, and factor in other runtime policies and checks, such as requests from unknown IPs, or impossible hops between geographies. What Can Go Wrong: When Authorization Is Missing The problem with implementing these hard guardrails is that your typical access control system doesn’t transfer over to agentic AI. It mainly considers authentication and its permission model is built around long-lasting roles and credentials. As proof, 53% of 5,200 open source MCP servers rely on long-lived static secrets like API keys, and only about 8.5% use OAuth, found an Astrix study. But as we’ve seen time and time again, authenticated isn’t the same as authorized. It actually means very little, given 99% of attack attempts analyzed by Salt Labs came from authenticated API sources. And things can go south when this is the case. For example, take the story of an Australian who asked his OpenClaw agent to get him into a class at his local gym. The agent discovered that the gym’s API had no authorization check on canceling other people’s reservations, so it removed someone ahead of him on the waitlist to move him up. Even though the agent was authenticated, the API never asked whether it was allowed to touch that reservation. Or take another case of over-scoped credentials: A coding agent at PocketOS used a broadly permissioned access token that allowed deletions, and wiped a production database and its backups in nine seconds. In both scenarios, agents gained too much access. This means that better prompts wouldn’t have helped: API authorization was required. The Answer: Runtime Authorization for Agents The way to balance innovation and hard guardrails is better runtime authorization for agents. This means deciding what each user, system, or agent is allowed to do in the moment, based on identity, context, and policy. There are several core principles involved here to fix API authorization. First is having narrowly scoped, task-bound permissions in which each agent gets only what the current task needs, per API, per method, per resource. And nothing else. In this scenario, authority is delegated. In other words, the agent acts on behalf of a user, and the token carries both identities so every API knows who is asking and for whom. There should also be zero standing privileges, meaning that agents only carry short-lived credentials issued for the job and gone when it ends. No long-lived static API keys. Lastly, agentic access control requires better policies, evaluated at the API level. Every call should be checked against the current context of the operation, not simply against the permissions granted at login. If an action is deemed high-risk, like for payments or data exports, the system should escalate for human approvals. All in all, an agent doesn’t need to be someone. It needs to prove what it’s allowed to do. The takeaway to evolve authorization is to treat agents as applications with ephemeral credentials, not new directory accounts that become tomorrow’s orphaned identities. In Practice: An Agent-Driven API Workflow Let’s consider a specific scenario in which these guardrails could be applied. Suppose a support rep asks an agent to refund a customer’s order. It might walk through the following steps: Delegation: The agent exchanges the rep’s token for its own. The new token names both the agent and the rep, is transactionally scoped to read orders and issue refunds for that customer, and expires in minutes. Allowed read: The agent calls the Orders API to look up the order. In scope, so it’s allowed. Runtime decision: The agent calls the Payments API to refund $80. Policy checks the rep’s permissions, the customer, and a refund limit, then allows it. Step-up: The agent tries a $2,000 refund. Policy flags it as high-risk and routes it to a human for approval. Hard stop: The agent tries to export the customer’s full history. Out of scope, so the API denies it. Cleanup: The task ends and the token expires. No standing access remains, and the log shows which agent acted, for whom, and why each call was allowed or denied. Interestingly, in this setup, the same pattern would have stopped the gym authorization incident at step 5. A similar setup with granular checks and hard stops would have stopped the PocketOS deletion and many of the other agentic AI security incidents we’ve read so much about lately. Prompts Aren’t Enough, Security Must Go Deeper We can’t rely on soft guardrails or typical AI security centered on authentication. Security clearly must go deeper to API-level authorization to respond to these threats. So much revolves around APIs, especially as MCP-driven development takes off. As such, for systems to maintain integrity and not break a least-privilege model, we really need continuous checks for agentic AI that go beyond what we’d grant to a human operator. They should be enforced at the API level, where access is actually granted and where you have machine-readable code to track, monitor, and make decisions. Here, open standards like OAuth and OpenID Connect matter a ton. MCP’s authorization specification itself builds on OAuth, so teams can reuse proven patterns instead of inventing new ones. Yet, the devil is really in the details of these implementations, because having a naive approach to OAuth won’t work at scale. The best path forward then is to take established identity standards and practices seriously when rolling out agents. The overall solution isn’t necessarily making new agent identities or taking away capabilities entirely. It’s limiting them with time-bounded access, task-specific guardrails, and relevant context. As most enterprises will see, this requires smart, flexible runtime authorization to enact at scale. AI Summary This article explains why AI agents need granular, runtime API authorization rather than broad, long-lived permissions and prompt-based restrictions. AI agents are often granted long-lived, overly broad permissions, which breaks a least-privilege model and makes unintended or destructive actions likely. Soft guardrails, such as instructions in a prompt, can be violated by nondeterministic agents or prompt injection, while hard guardrails use narrowly scoped, short-lived tokens enforced at the API layer. Authentication alone is insufficient: 99% of attack attempts analyzed by Salt Labs came from authenticated sources, and incidents like the PocketOS database deletion stemmed from over-scoped credentials. Runtime authorization for agents relies on task-bound permissions, delegated authority carrying both user and agent identities, zero standing privileges, and API-level policy checks with human approval for high-risk actions. Open standards like OAuth and OpenID Connect, which underpin MCP’s authorization specification, offer proven patterns, but naive implementations do not scale. Intended for API architects, security engineers, identity specialists, and platform teams deploying AI agents that access APIs and MCP servers. The latest API insights straight to your inbox