If an AI agent uses valid credentials to do something wrong, what is supposed to catch it?

Short answer: A credential check will not catch it. A valid credential proves who is calling, not whether the user wanted that call. Two more layers answer the rest: a behavioral check that asks whether the action fits the task, and a user-set boundary that limits what the agent can hold in the first place. The boundary is the one the user controls, because it is decided outside the agent.

A post in r/mcp this month asked the question in its plainest form: if an AI agent uses my valid credentials to do something bad, what control is supposed to know it wasn’t me? The poster had already thought past the usual answers. A separate agent identity, short-lived credentials and least privilege, they wrote, “mostly reduce what it can do.” They do not settle whether an allowed action was intended. The honest answer is that no single control does both.

Why doesn’t a valid credential tell you the action was wanted?

Because a credential is checked for authenticity, not for intent. The server verifies the signature and applies the role. It has no view of the reason the call was made.

Ido Shlomo, co-founder and CTO of Token Security, gave a concrete case in an October 2026 piece on BleepingComputer. A developer asks an agent to find out why a nightly export job is failing. The team rule is that agents work through read-only roles. But the developer also holds an admin role for on-call work, and both profiles sit in the same AWS config file. The agent hits AccessDenied, switches to the admin profile, and runs aws s3 rm against the production bucket. His summary: “AWS checks the signature, not who is holding the key.”

Every individual step was permitted. The developer may assume the admin role. The admin may delete objects. The violation was that an agent used a role agents were not supposed to use. Worth knowing: the piece is sponsored content written by Token Security, which sells tooling in this area, so read it as a practitioner’s account from a vendor with a stake. The scenario still shows the mechanism cleanly. The article also says this behavior does not depend on where the instructions came from: a malicious prompt can cause the overreach, and so can a mistaken assumption during an authorized task. Its advice is to start with credential scoping at the target, because that sets the agent’s reach wherever it runs.

What did Uber add on top of authorization?

A behavioral layer that judges the proposed action in context. In a November 6, 2026 engineering post, Uber describes the threat it set out to address: “an agent manipulated into an unintended action even when the user, agent, tool, and every API call are legitimately authorized.”

Uber says identity and authorization “remain essential” but are “no longer sufficient” once software reasons over untrusted content, picks tools on its own and acts for a user. Its answer follows the familiar policy pattern. A registry holds each agent’s persona, permitted intents and constraints. A decision service evaluates proposed actions against them, using small specialized models hosted locally to stay inside a latency budget. Enforcement hooks apply the verdict before the action proceeds. In Uber’s words, an agent “may therefore possess valid credentials to invoke a tool” while the specific action can still be denied because it falls outside the agent’s defined intent.

The post is also candid about limits. Uber’s conclusion says the controls “reduced risk and raised the cost of exploitation, but did not eliminate it,” and that effectiveness against new manipulation techniques “remained less predictable.” That is the right register for any control that judges meaning. It works on probabilities.

One line in that conclusion deserves more attention than it will get. Uber writes that its most effective mitigation was “restricting agents to explicit intents and constraints that tightly govern what may happen and under what conditions,” and that this cost some of the flexibility that makes autonomous agents attractive. We read that as: keep the agent narrow first, then add detection.

This is one company’s own design: Uber governing the agents that run inside Uber, the ones it builds and third-party ones. It is a strong answer to “should this agent do this, right now?” inside one company.

Where does the user’s own boundary fit?

It is the layer that exists before any judgment call. When an agent reaches an app from outside, someone has to decide how much it may touch at all. We think that someone is the user, per grant, in a place the agent cannot operate.

With AgentAdmit, the grant starts in the app’s signed-in session, and the consent step runs on a hosted AgentAdmit page opened on the app’s behalf. The user chooses the scopes and the duration there. The connection token is delivered to the user, not to an agent endpoint, and the user hands it to their agent. The agent exchanges it for its own scoped access token, and the exchange response lists only the endpoints its scopes cover. That token is a different object from the user’s login, so the user’s own admin role is not what the agent holds. The app checks the token on every call.

Three properties matter for the “valid credentials, wrong action” problem:

  • The agent cannot widen its own grant. Access tokens carry no refresh tokens. A missing scope returns 403 insufficient_scope, and getting it means a new grant that the user authorizes. An injected instruction has no programmatic path to escalated permissions.
  • The user can cap volume. Call ceilings, per day or for the life of the connection, are set at the consent step and checked on each verified call. Ceilings count calls, not dollars. See Can you set limits on how much an AI agent uses your access?
  • The app can require a human for the sensitive action. An app owner can mark a scope as confirm-each-time. The call is then refused until the user completes a user-verified passkey ceremony that signs a commitment to the exact action shown. See Can an AI agent be required to get human confirmation for one action, even inside a valid grant?

The user can revoke the connection at any time, and the app sees it on the next verification. Patent pending.

For the judgment call itself, what we ship is the record a person needs to make it. The user can put their intent on the grant in their own words. Every verified call lands in a tamper-evident audit trail. A connection that drifts from its own established pattern is flagged for review. On hard numbers that were set in advance, such as a burst of calls, an opt-in kill switch can end the connection without waiting for anyone. Two replies in the r/mcp thread ask for the same kind of record: the declared intent logged next to every action, and a decision log that is append-only and hash-chained so it holds up when someone questions it later.

The two designs are complements. Uber’s layer asks whether an action fits an agent’s purpose. The grant limits what the agent can reach even when it is wrong about its purpose, or has been steered. Where an app integrates AgentAdmit, the second limit is set by the user and not by the vendor of the agent.

What does a boundary not catch?

Misuse inside the grant. If a user grants an agent write access to one folder and a poisoned instruction makes it overwrite files in that folder, the grant was honored. The boundary caps how much damage is possible. It does not read minds. This is the r/mcp poster’s point, and it is correct.

That is why we pair it with the other controls instead of replacing them. Scope tightly. Use ceilings. Put confirm-each-time on the few actions that cost real money or cannot be undone. Keep an audit trail you can read after the fact. Several replies in that thread land on the same short list: give the agent its own credential, scope it to the job, and put irreversible actions behind a check that sees the exact arguments. For where the model’s own resistance runs out, see Where should AI agent guardrails live: in the prompt or at the token?

What should an app owner do about it?

Stop treating a valid token as the end of the question. Three habits cover most of it:

  1. Issue agents their own narrow credential, separate from the user’s login, so there is no broader role lying around to borrow.
  2. Let the user set scope, duration and a usage ceiling on the grant, and make the agent unable to change any of them.
  3. Require a human for the small set of actions you could not take back, and make revocation one click.

For the audit side, see How do you audit and revoke an AI agent’s access to user data? For why the injection path leads here, see Prompt Injection Is an Authorization Problem, Not Just a Model Problem.

FAQ

If an AI agent uses valid credentials to do something harmful, who is responsible?

Blame is the less useful question. The weak point is a broad credential with no other control in front of it. The server cannot tell a human call from an agent call when both carry the same credential. Giving the agent its own narrow token and a user-set boundary makes the attribution possible and the damage smaller.

Is authorization enough to secure an AI agent?

No. Uber’s engineering team writes that identity and authorization remain essential but are no longer sufficient when software reasons over untrusted content, selects tools and acts for a user. The threat it names is an agent manipulated into an unintended action while every party and call is legitimately authorized. You need a way to judge the action and a limit on what the agent can hold.

Can an AI agent use the user’s own admin credentials?

It can if they are reachable from where it runs, as in the shared config file example above. A user-mediated grant gives the agent its own scoped access token instead, so the user’s login is not what the agent presents.

Does a user-set boundary replace behavioral guardrails?

No. They answer different questions. The boundary limits what the agent can reach and how often. Behavioral checks judge whether a specific action fits the task. Use both.

Building an app or agent that needs scoped, bounded, user-approved access? See agentadmit.com.

Get new posts by email

One short email when a new post goes live. No spam, unsubscribe anytime.