VICTORIA. Book a call

Home / Journal / Governance

Governance

Access Control for AI Agents: Least Privilege in Practice

Most agents run on borrowed logins and admin keys granted to get a demo working. Here is how to scope an agent to one task, cap the damage before something goes wrong, and prove it in the logs.

What does least privilege mean for an AI agent?

Leadership wants the agent in production before the quarter ends. The integration needs credentials, so someone drops in an admin API key to get the demo running, with a promise to tighten it up later. Later almost never arrives.

Least privilege for an AI agent means it can touch only the systems, records and actions that one defined task requires, only while that task is running, and only under an identity that belongs to the agent. Nothing beyond that. If you can't fit a list of what your agent is permitted to do on a single page, it has too much access, and fixing that is a design decision, not a matter of writing a better prompt.

None of this is a new idea. The difference with agents is that the caller isn't a fixed script. An agent reads untrusted text, chooses which tool to call, and strings several calls together. A conventional integration does the same three things every time; an agent can be persuaded to do a fourth. That's why the access an agent holds matters more than the instructions you gave it.

Below we cover why agents end up with too many permissions, what sensible permissions look like for a real workflow, a seven-step way to put them in place, and what to log so you can prove it. If you want the broader governance picture first, read our guide to AI governance and evaluation.

Why do most AI agents have more permissions than they need?

Access gets granted to make a pilot work, and no one is responsible for taking it back. According to the survey data, that's the norm, not an edge case.

In January 2026 the Cloud Security Alliance surveyed 228 IT and security professionals for its Aembit-sponsored report, Identity and Access Gaps in the Age of Autonomous AI. 74% agreed that agents frequently get more access than they need. 43% said their agents run on a shared or generic service account, and 31% said agents run under a human user's identity. Just 36% give agents a dedicated identity, and 68% said they can't very clearly separate agent actions from human ones.

74% agree AI agents often get more access than necessary (Cloud Security Alliance, 2026, n=228)

68% cannot very clearly tell agent actions from human actions (Cloud Security Alliance, 2026, n=228)

13% strongly agree they have the right governance structures for agents (Gartner, 2025, n=360)

Leaders are aware of the risk. Gartner surveyed 360 IT application leaders in May and June 2025 and reported that 74% view AI agents as a new attack vector, yet only 13% strongly agree they have the right governance structures in place. Grant Thornton's 2026 AI Impact Survey of 950 executives found that close to three in four organisations let agentic AI into their data and processes.

Put that together: agents are being given access, that access is broad, and in most companies nobody can say after the fact which actions the agent took. If you can't attribute an action, you can't audit it.

How is giving access to an AI agent different from a user or a service account?

A user account is built around a person who uses judgement. A service account is built around code that does the same thing every time. An agent is neither, and if you treat it as one or the other it picks up the weaknesses of both.

QuestionHuman userService accountAI agent
Who decides the next action?The personFixed codeThe model, at run time
Can untrusted input change behaviour?RarelyNoYes, through prompt injection
How wide is the action space?Whatever the UI allowsExactly what the code callsEvery tool it can see
How fast can damage spread?Human speedPredictableMachine speed, chained across systems
Who is accountable in the log?The named userUsually the owning teamUnclear unless designed in

Pay attention to the third row. OWASP's Top 10 for LLM Applications lists Excessive Agency as risk LLM06 for 2025, with three root causes: excessive functionality, excessive permissions and excessive autonomy. The example it gives is simple. An assistant meant to summarise email relies on a plugin that can also send email. A crafted message lands in the inbox and instructs the model to find sensitive mail and forward it. OWASP's fix isn't a smarter model. It's a read-only scope, plus a human who sends every draft.

Which permissions should an AI agent really have?

Exactly what one named task needs, written down before anything is built, with reads and writes kept on separate lists. Begin at zero and add. Never begin at admin and subtract.

Picture a customer support agent handling refund requests for a mid-market retailer. A grant scoped to that task would look like this:

  • Read: the order record and ticket history for the customer on the open ticket, and nothing else. Not the customer table, and not anyone else's records.
  • Write: a draft reply on that ticket, plus a refund request left in a pending state.
  • Act without approval: refunds below a set amount on orders that satisfy the written policy.
  • Act with approval: refunds over that amount, and anything that changes an address or payment details.
  • Never: delete records, bulk-export data, alter its own permissions, or call any tool that isn't on the list.

Look at what's absent. There's no access to the CRM as a whole, to the finance ledger, or to email outside the ticketing system. Even if a prompt injection works, the most it can do is draft a poor reply or queue a refund that a person will check. That's the whole idea behind least privilege: you limit the damage before you know what's going to break.

Two rules keep this intact in practice. The first is that the agent's effective access should be the intersection of its own permissions and those of the person it's acting for; a support agent working on behalf of a tier-one rep shouldn't see what a manager sees. The second is that the downstream system enforces the limit, not the prompt. Microsoft's July 2026 guidance, Least privilege for AI agents: Identity, access, and tool binding, says the same thing: being assured that an agent will only do something is not a control. Hard authorisation boundaries are.

To work out which of those actions need a human in the loop, read our piece on where to put people in an AI workflow.

How do you put least privilege in place for an AI agent, step by step?

There are seven steps, done in order. Most companies can get through the first three in a week, and those three take away most of the exposure.

  1. Take inventory of every agent and what it runs as. Record each agent, the credentials it uses, its owner and what it touches. Flag anything that runs on a shared service account, someone's personal login or an admin key.
  2. Give every agent its own identity and a named owner. One agent, one identity, one accountable person, and no secrets shared across agents. That's what lets you revoke a single agent without breaking three others.
  3. Define the task first, then the grant. Write down the one workflow the agent supports. List the reads, writes and actions it requires. Anything left off the list is denied by default.
  4. Bind tools explicitly. Only expose an approved list of tools and functions. If the agent just needs to read mail, don't hand it a mail plugin that can also send. Keep read and write in separate tools so each can carry its own scope.
  5. Keep access short-lived. Issue credentials scoped to the task and let them expire when it finishes. When higher access is required, grant it just in time and fall back to the baseline afterwards. Temporary access with no expiry turns into permanent access.
  6. Require approval for the expensive actions. Deletes, exports, payments, permission changes and anything customer-facing over a threshold go to a person. Add spend limits, retry limits and a kill switch that genuinely invalidates tokens.
  7. Review on a schedule and whenever the workflow changes. Strip out permissions the logs show aren't being used. Re-approve the grant each time the agent gains a tool or a task. Look at permissions in combination, since two low-risk grants can add up to a high-risk one.

The one-page test. If the person who owns the agent can't write its permissions on a single page, with reads, writes, approvals and never-allowed actions listed separately, the agent isn't ready for production.

What should you log to show an AI agent stayed inside its access?

Log every tool call: which agent it was, who it acted for, what it touched and whether that was in scope. Logging only what the model wrote back looks like an audit trail but is close to worthless in an investigation.

Microsoft's guidance spells out the fields: agent identity, role, effective scope, the resource accessed, the action taken, the user it acted on behalf of, timestamps, and correlation IDs tying together the orchestrator, the tool call and the downstream system. With those in place you can answer the question every incident review opens with: did the agent do this, and was it allowed to?

Most companies can't answer that today. Grant Thornton's 2026 AI Impact Survey found that 78% of executives lack strong confidence they'd pass an independent AI governance audit within 90 days, and only 20% have a tested AI incident response plan. Both of those begin with access logs.

22% have strong confidence they could pass an independent AI governance audit within 90 days (Grant Thornton, 2026, n=950)

20% have a tested AI incident response plan (Grant Thornton, 2026, n=950)

Practise revoking access before you actually need to. In a test window, pull the agent's credentials, check that every downstream system rejects its next call, and time how long that took. If no one has ever done this, you don't have a kill switch. You have a hope.

Where do teams go wrong with AI agent access control?

Usually in the same five places, and each one began as a shortcut to get a pilot running.

  • Admin rights to unblock the pilot. Broad owner or admin roles handed out for the demo and never pared back. The pilot turns into production with the demo's permissions still attached.
  • Running as a person. The agent signs in with an employee's login. When that employee leaves, the agent breaks or, worse, keeps their access with nobody watching.
  • Shared keys. Several agents on a single API key. You can't tell which one acted, and you can't revoke one without halting all of them.
  • Trusting the prompt. The system prompt says "only read, never send" while the tool itself can send. Instructions are not permissions.
  • Quiet scope creep. A read-only agent gains write access one integration at a time. Every change looked minor, and nobody ever reviewed the total.

If an agent you've already shipped shows three or more of these, it's probably due for triage rather than one more patch. Our AI Rescue delivers a written fix, rebuild or retire verdict in 48 hours.

How does Victoria handle access on a deployment?

Access gets agreed before any code is written: one workflow, one owner, one number, and one page of permissions, signed off by whoever owns the system the agent will touch.

We build against your real systems, giving each agent a dedicated identity rather than a borrowed login. Testing runs on 100 to 300 of your real cases against a pass mark agreed in advance, and the test set covers the cases that should be refused or escalated, not just the ones that should go through. Deployment comes with spend limits, retry limits, a kill switch and humans in the loop wherever errors cost money. After that we operate it, review the access logs every month and strip out whatever the agent doesn't use.

If what you need is the policy, logging and audit trail around agents you already run, that's our governance, evaluation and measurement service line, with affordable monthly packages sized to your workflow and larger scopes quoted to fit.

Questions we get asked

What is the principle of least privilege for AI agents?
It means an AI agent can reach only the data, tools and actions required for one defined task, only for as long as that task is running, and only under an identity that belongs to the agent alone. Everything else is denied by default. The goal is to limit the damage if the agent gets something wrong or is manipulated by untrusted input, instead of counting on prompt instructions to keep it in line.
Can I just tell the agent in its prompt not to do certain things?
No. A prompt is guidance, not a control. Agents read untrusted text, and a carefully crafted email, ticket or web page can override instructions through prompt injection. OWASP files this pattern under Excessive Agency, risk LLM06 for 2025. If a tool is able to send, delete or export, assume the agent can be talked into doing it, and either take the capability away or put an approval in front of it.
Should an AI agent use my employees' logins?
No. An agent running under a person's identity gets everything that person can do, which is nearly always more than the task calls for. The logs then show the employee rather than the agent, so you can't tell who acted. And when the employee leaves, the agent either stops working or holds on to access nobody is watching. Give every agent its own identity and a named human owner.
What is just-in-time access for AI agents?
Just-in-time access means the agent keeps a minimal baseline and gets higher permissions only when a particular step needs them, for a short window, after which they expire on their own. It takes the place of standing access that sits idle most of the time. The practical test is easy: a permission without an expiry will end up permanent, and nobody will remember why it was granted.
How often should we review an AI agent's permissions?
Review on a fixed schedule and whenever anything changes. A monthly check against the access logs turns up permissions the agent never uses, and those should go. A new tool, data source or task should trigger re-approval of the entire grant, because small additions compound. Two low-risk permissions can combine into a high-risk path nobody signed off on.
Does least privilege slow down an AI deployment?
It adds a few days up front and saves weeks of rework later. Writing the permission page makes the team define the workflow, which is exactly the step most stalled pilots skip. Scoped access also gets security and compliance sign-off faster, since the reviewer can see precisely what the agent can and can't touch. The slow route is shipping with admin keys and bolting on controls after an incident.

Sources

  1. LLM06:2025 Excessive Agency, OWASP Top 10 for LLM Applications. OWASP GenAI Security Project (2025)
  2. Identity and Access Gaps in the Age of Autonomous AI. Cloud Security Alliance, sponsored by Aembit (2026)
  3. Gartner Survey Finds Just 15 Percent of IT Application Leaders Are Considering, Piloting or Deploying Fully Autonomous AI Agents. Gartner (2025)
  4. Least privilege for AI agents: Identity, access, and tool binding. Microsoft Security Blog (2026)
  5. 2026 AI Impact Survey. Grant Thornton (2026)

One task. One identity. One page of permissions.

We deploy agents against your real systems with a dedicated identity, task-scoped access, spend limits, retry limits, a kill switch and humans in the loop where errors cost money. We test on 100 to 300 of your real cases against a pass mark set in advance, then review access monthly. Packages from $999 a month.

No obligation. A person replies within one business day.
Already shipped an over-permissioned agent? Start an AI Rescue