Security Objective
Least privilege is the control that determines how much authority exists in the first place: which identities an agent deployment holds, which roles and scopes those identities carry, which resources, tools, data and destinations are reachable through them, and how long all of that persists. NIST defines least privilege as granting only the minimum access privileges necessary to accomplish assigned tasks, and NIST SP 800-53 Rev. 5 control AC-6 states the general requirement in its control catalog. Neither is agent-specific, which is exactly why they apply: they define the property every agent deployment should inherit, not an agent mechanism.
For AI agents this property matters disproportionately, because the model's interpretation of language is probabilistic while the authority behind it is not. A successful injection, a retrieval error or a plain misunderstanding does not create new permissions. It can only act through authority that already exists. Reducing that authority is the control this page covers.
Identity and policy facts are resolved from authoritative stores, out of band, and the envelope, reach and scope are system-enforced constraints rather than model-authored text. The user task remains variable content, and a system component does not make the content it carries trusted. A narrower envelope changes the maximum consequence of anything the agent attempts; it does not change which request is permitted, which remains the job of authorization at execution time.
This page is deliberately not a generic identity and access management article. Every section is framed against agent workflows, model influence and blast radius.
Threat Model: Influence Acting Through Existing Authority
The threat model is simple and it is the same one every attack article on this site converges on: the model can be influenced by content it processes, and the consequences of that influence are determined by the authority available at that moment.
Injected or misleading content steers the plan. Its reach is exactly the reach the deployment granted.
No attack at all: a misunderstanding or hallucinated step is equally constrained by a narrow envelope.
Broad identities, shared credentials and inherited permissions convert one affected component into many affected systems.
Long-lived credentials and stale grants let a past mistake or compromise remain exploitable.
Least privilege does not reduce the probability of influence. It reduces the set of effects that influence can reach, which is a different and independently testable property. The attack-side perspective is documented in AI agent prompt injection, multi-agent prompt injection and persistent prompt injection.
Standing Authority vs Task-Scoped Authority
Standing authority is what an identity can do at any time, independent of any task. Task-scoped authority is what a specific task, session or delegation makes available, and only for its duration. Agent deployments tend to grow the first and neglect the second, because standing grants are easier to wire up.
| Property | Standing authority | Task-scoped authority |
|---|---|---|
| Exists when | Always | Only while the task runs |
| Derived from | Deployment configuration and provisioning | The initiating principal and task context |
| Exposure window | Unbounded | Bounded by the task lifetime |
| Blast radius of misuse | The full standing envelope | At most the task subset |
| Effort to operate | Low to grant, high to review | Higher per task, lower to reason about |
The objective is not to eliminate standing authority, which is rarely possible, but to shrink it to what the deployment genuinely always needs and to move everything else into bounded, task-derived grants.
Effective Permissions and Aggregate Privilege
The authority an agent actually holds is the union of everything attached to it: direct roles, group memberships, tool registrations, downstream entitlements reachable through its credentials, and integrations that act on its behalf. The configured role is often only a small part of that union.
Microsoft's vendor guidance on least privilege for AI agents, labelled here as vendor guidance, recommends reviewing the aggregate or effective permissions of agent identities rather than only the roles directly assigned. The point generalizes: effective access reviews, not configuration reviews, are the unit of assurance.
What an effective-permission review must include
- Direct roles and scopes assigned to the identity
- Group, role and permission inheritance
- Entitlements of every credential the agent can present downstream
- Tools and connectors registered for the agent, including their own permissions
- Integrations and automation that act with the agent's identity
- Cross-tenant, guest and federated paths reachable through any of the above
Unique Workload Identity vs Shared Credentials
An agent that acts through a shared credential inherits everything that credential can do and leaves no way to attribute its actions separately. A unique workload identity is the precondition for scoping, review and revocation at agent granularity.
| Property | Shared credential | Unique workload identity |
|---|---|---|
| Scope | Everything the credential covers | Exactly what this agent needs |
| Attribution | Actions cannot be separated by caller | Each action attributable to one identity |
| Revocation | Revoking affects every consumer | Revoking affects this agent only |
| Review | Impossible to assess per consumer | Effective permissions reviewable per identity |
Microsoft's Zero Trust guidance for AI agents, again vendor guidance, describes dedicated agent identities bound to task and user rather than shared or standing credentials, and its companion guidance discusses managed identities and workload federation as ways to avoid distributing secrets at all. The architectural point does not depend on the vendor: one agent, one identity, scoped to that agent's actual work.
Read and Write Separation
Most agent tasks are read-heavy: retrieve, summarize, compare, draft. When the same identity also carries write, send, delete or purchase rights, every reading task silently carries consequence authority it does not need.
The identity used for retrieval and analysis holds no mutation rights; write-capable identities are separate and elevated only for tasks that need them.
Where writes are required, they are bound to specific resources or collections rather than the whole store.
Where the outcome is a message or change, the agent produces an artifact and a separate, narrower step performs the irreversible act.
Read/write separation interacts with authorization but does not replace it: a read-only envelope still needs authorization to decide which reads are permitted, and a write step still needs exact-action evaluation before it executes.
Resource, Tenant and Workspace Scoping
Scope answers where an identity's authority applies. The narrower the scope, the smaller the set of objects an influenced agent can touch, regardless of what its permissions are within the scope.
| Scope level | Reach | Typical use |
|---|---|---|
| Organization or tenant | Everything the tenant contains | Almost never justified for an agent |
| Workspace, project or site | One bounded work area | The default unit for agent tasks |
| Collection or folder | A subset of a workspace | Routine retrieval and processing tasks |
| Single resource | One object | Narrowly defined single-purpose tasks |
Tool and Action Exposure Minimization
Every registered tool extends the action space available to the model. Tool exposure minimization asks which tools a task actually needs and removes the rest from the session, so that a steered plan cannot even name an action the deployment never intended.
Microsoft's vendor guidance recommends denying unreviewed tools, integrations and cross-tenant paths by default rather than registering everything that might someday be useful. Two boundaries apply here. First, exposure is reach, not permission: a tool being unavailable reduces what can be attempted, while whether an available invocation may run is decided by authorization. Second, exposure per task beats exposure per deployment: the safe default is the smallest tool set the current task class requires.
Exposure review questions
- Is every registered tool needed by a current task class?
- Which tools have irreversible or external effects, and are they separated from routine tasks?
- Can a tool's dangerous parameters be constrained at registration, not only at call time?
- Is the addition of a new tool a reviewed event, or a configuration detail?
Data Access Minimization
Data access is the input side of privilege. An agent that can read only one workspace cannot leak, corrupt or be steered by content outside it, and an agent that never sees a secret cannot disclose one.
Restrict retrieval indices and file access to the collections the task class needs, with classification-aware boundaries for sensitive sets.
Where structured data is involved, expose the fields required rather than whole records or tables.
Return the passages or records that answer the task instead of wholesale documents where the system supports it.
The boundary with information flow control matters: this section decides what data the agent can reach at all; information flow control decides whether data that was reached may travel to a particular destination. Both are needed, and they fail independently.
Outbound and Network Reach
Outbound reach determines which destinations an agent's tools can talk to at all: which hosts, which protocols, which external services. Reducing that reach shrinks the set of places influenced behaviour could send anything.
The boundary to the egress control is explicit: this page covers reducing reach - not having a path to most destinations. Deciding which destinations, protocols and ports a permitted path may reach is the job of network and egress restrictions; whether particular data may cross it is decided by information flow control. An agent with no path to external hosts cannot exfiltrate through them, but an agent with a path still needs flow policy on what may cross it.
Reach reduction checks
- The agent runtime can reach only the endpoints its tasks require
- Arbitrary outbound connections from tool execution are not available by default
- New destinations are an explicit, reviewed addition rather than an open set
- Reach is enforced at the network layer, not described to the model
Just-in-Time and Time-Bound Elevation
Some tasks genuinely need more authority than the daily baseline: a migration, a one-off export, an administrative fix. The least-privilege answer is elevation that is requested for a purpose, granted for a bounded window, and returned automatically, rather than a permanently wider envelope.
Elevation names the task it serves, so the elevated window is reviewable against a concrete need.
Elevation expires without action; forgetting to revoke is the normal case, so expiry must not depend on remembering.
Request, grant, window and use are logged, making elevated periods the highest-priority review target.
Microsoft's vendor guidance describes just-in-time and time-bound privilege for agent identities, and its companion guidance discusses privileged access management for elevation workflows. The principle is older than any product: keep the standing envelope small and make every exception temporary, explicit and auditable.
Credential Lifetime vs Privilege Lifetime
Two clocks run on every grant, and confusing them produces quiet over-privilege. Credential lifetime is how long the secret or token remains technically valid. Privilege lifetime is how long the grant behind it should exist at all. A short-lived token on a permanently broad role is still permanent broad authority, re-issued continuously.
| Property | Credential lifetime | Privilege lifetime |
|---|---|---|
| What expires | The technical artifact | The authorization the artifact carries |
| Typical failure | Long-lived secrets | Grants that outlive the task or project that justified them |
| Bound by | Token TTL, rotation, workload federation | Review cadence, task end, ownership lifecycle |
| Short one is enough? | No: broad standing privilege re-minted daily | No: a dead grant with a valid credential is still usable until revoked |
Microsoft's vendor guidance discusses short-lived tokens and managed identities to reduce credential lifetime; the complementary discipline on privilege lifetime is ownership and review, covered in the lifecycle section below.
Delegated Authority vs Workload Authority
An agent usually holds authority of two different kinds. Delegated authority is a bounded subset of a user's rights, handed to the agent for a task. Workload authority is what the service itself is entitled to do, independent of any user.
| Aspect | Delegated authority | Workload authority |
|---|---|---|
| Ceiling | At most a subset of the user's own rights | Whatever the service was granted |
| Shape | Narrow, task-shaped, expiring | Standing, deployment-shaped |
| Least-privilege question | Which slice of the user's rights does this task need? | Which service-level rights does this deployment truly always need? |
| Misuse reach | One user's slice | Potentially every user and resource the service touches |
How a concrete request is evaluated under either source - including preserving the initiating principal - belongs to agent authorization.
Cross-Tenant, Guest and Integration Paths
Privilege rarely stops at the tenant boundary. Guest invitations, federated access, marketplace integrations and automation platforms can each carry an identity's effective reach into other tenants or back into this one through a second door.
Paths to enumerate explicitly
- Guest and external-sharing grants the agent identity holds or can trigger
- Integrations that act with the agent's identity in another tenant
- Automation or workflow platforms holding credentials on the agent's behalf
- Federation and trust relationships that extend a local grant elsewhere
- Paths by which content or data from another tenant enters this agent's context
The vendor guidance referenced on this page recommends denying unreviewed cross-tenant paths by default. The general rule is the same as for tools: a path that has not been enumerated and reviewed is a path that should not exist for the agent.
Permission Inheritance and Transitive Reach
Effective permissions are transitive. A role implies scopes, a group implies roles, a credential implies downstream entitlements, and an integration implies whatever its own credentials can do. Each hop is locally plausible; the composition is what matters.
agent identity -> read role on workspace Aworkspace A -> shared drive connector -> drive root -> export integration -> external destinationNot whether the read role is justified, but whether the whole reachable graph is acceptable for this identity.
Transitive reach is why effective-permission reviews must follow credentials and connectors rather than stop at role assignments, and why a new integration is a privilege change, not a feature change.
Permission Creep, Stale Grants and Ownership
Grants accumulate because adding is easy and removing is scary. Tasks end, prototypes become production, team members change, and the agent's envelope keeps every right it ever needed. Stale grants are standing authority with no current justification - pure attack surface.
Every grant has an accountable owner who can say why it exists; grants without an owner are removal candidates.
Grants record the task or project they serve and end when it ends, or come up for review on a fixed cadence.
New tools, new data sources or new workflows trigger a review of effective permissions, not only of the new item.
Grants unused over a defined window are flagged; removal is the default response unless the owner re-justifies.
Microsoft's vendor guidance recommends re-reviewing agent permissions when workflows, tools or data scope change. Access review tooling can automate the cadence; it cannot supply the judgement about what the agent still needs.
Break-Glass and Operational Exceptions
Operations sometimes need authority outside the normal envelope: an incident, a recovery, an urgent fix. The least-privilege answer is not to widen the standing envelope for these cases, but to define a narrow, monitored exception path.
Exception credentials and grants are distinct from daily identities, so their use is unmistakable in telemetry.
The exception expires; returning to baseline requires no cleanup action to be safe.
Every activation produces a review record; exception use without review is itself an incident finding.
Boundary to Agent Authorization and Other Controls
The most important sentence on this page: least privilege decides how much authority exists; agent authorization decides whether one concrete request may use it. A least-privilege system can still authorize a bad request inside its envelope, and a perfect authorization layer over a huge envelope still leaves a huge blast radius if that layer fails.
| Control | Question it answers | Not its job |
|---|---|---|
| Least privilege | How much identity, credential, tool, data and network reach exists at all | Evaluating individual requests |
| Agent authorization | May this concrete request execute, under whose authority | Deciding how much authority exists |
| Human-in-the-loop | Should a person confirm this high-impact action | Shrinking the standing envelope |
| Information flow control | May this data reach this destination | Deciding what data or destinations are reachable at all |
| Network / egress restrictions | May this connection or transfer proceed | Reducing which paths exist |
| Tool-chain analysis | Is this sequence of actions unsafe in combination | The size of any single grant |
| Sandboxing / containment | How are execution effects isolated and capped | Which permissions the identity holds |
Deny by Default for Unreviewed Capability
Deny by default has a specific meaning on this page: a capability - a tool, an integration, a scope, a cross-tenant path, a destination - that has not been enumerated, assessed and approved is not available to the agent. Availability is the output of review, not the starting point.
Deny-by-default conditions
- A tool or connector is unavailable until its permissions and parameters are reviewed
- A new data source is out of scope until its classification and need are recorded
- A cross-tenant or guest path does not exist until explicitly justified
- An outbound destination is unreachable until it is on the reviewed allow set
- A standing grant expires unless re-justified at review
This is a provisioning discipline, and it composes with the request-time deny-by-default of agent authorization: one governs what exists, the other governs what runs.
Worked Scenario: Same Influence, Two Authority Envelopes
The scenario is synthetic, bounded and non-operational. Its purpose is to show that identical model influence produces different consequences under different authority configurations. It demonstrates no technique.
An internal reporting agent is asked to summarize the contents of a shared project folder for a weekly status note.
One retrieved document contains embedded text steering the agent toward exporting a customer table to an external recipient. The same content is processed in both configurations.
The agent runs under a shared service credential with organization-wide read access, write access to several workspaces, a registered outbound connector and an export integration. The influenced step maps onto real reach: the data is readable, the destination is reachable, and the export path exists.
The agent has a unique identity with read-only access scoped to the project folder, no customer database in any reachable scope, no outbound connector and no export integration. The identical influence finds no corresponding authority: the table is not readable, the destination is not reachable, and no tool can attempt the action.
The influence was identical. The consequence was not, because the authority envelope was the only thing that differed. In configuration B, nothing about the outcome required the model to resist the influence.
In both configurations, any concrete request that is attempted still requires authorization at the enforcement point. Least privilege decided what could not exist; it did not decide what was permitted.
What the Scenario Does and Does Not Prove
| Claim | Supported | Not supported |
|---|---|---|
| The narrow envelope removed the influenced path | Yes, for this configuration and this path | That the deployment has no other reachable path |
| No data reached an external destination | Yes, in configuration B | That configuration B can never leak by another route |
| Least privilege compensated for model influence here | Yes, for this run | That it detects, prevents or reduces influence |
| The envelope was sufficient overall | Not assessed | Any coverage claim without the inventory and metrics below |
A worked scenario shows mechanism, not coverage. The assurance comes from the inventory, review and measurement work in the next two sections.
Telemetry, Inventory and Effective Access Review
Least privilege is maintained, not installed. The operational base is a current inventory of identities, grants, tools, credentials and integrations, plus telemetry that shows which of it is actually used.
- 01Identity inventory
Every agent and workload identity, its owner, its purpose and its creation date.
- 02Grant inventory
Roles, scopes, group memberships and resource grants per identity, including inherited ones.
- 03Tool and integration inventory
Registered tools, connectors, automations and cross-tenant paths, each with its permissions and owner.
- 04Credential inventory
Credential type, lifetime, rotation and the systems that accept it.
- 05Usage telemetry
Which grants, tools and scopes were actually exercised, per identity and per time window.
- 06Review output
Effective-access review records: what was assessed, what changed, what was removed and what was re-justified.
Signals worth alerting on
- A grant exercised for the first time in a long window
- Tool or scope usage outside the identity's task class
- A cross-tenant or outbound path used that has no current justification
- Elevation events and everything done during the elevated window
Testing and Metrics
Each measure is reported separately with its denominator stated. There is no composite least-privilege score, because a single number hides which dimension regressed.
| Measure | Numerator | Denominator |
|---|---|---|
| Unique Identity Coverage | Agents acting under a dedicated identity | All deployed agents |
| Standing Write-Privilege Ratio | Agent identities holding standing write rights | All agent identities |
| Cross-Tenant Reach Count | Agent identities with any cross-tenant path | All agent identities |
| Unreviewed Tool Exposure Rate | Registered tools without a completed review | All registered tools |
| Effective-Permission Review Coverage | Identities with a current effective-access review | All agent identities |
| Stale-Grant Share | Grants unused beyond the defined window | All grants in the inventory |
| JIT Elevation Share | Elevated operations performed under time-bound elevation | All elevated operations |
| Revocation Completion Time | Time from withdrawal decision to enforcement | Reported as latency distribution, not a rate |
Benign task success is reported separately as utility and is never folded into a security figure: a deployment whose agents can do nothing scores perfectly on every privilege measure. Controlled tests - simulated influence against representative tasks - measure whether the envelope, not the model, is what prevented the consequence.
To practice judging authority envelopes, try the Least Privilege lab.
Incident Response and Common Mistakes
After an influence event or an unauthorized action, the least-privilege questions are about reach: what could the affected identity touch, what did it touch, and what must shrink so the next event is smaller.
Revoke, disable, review
- Revoke or rotate the credentials and tokens of every affected identity
- Disable tools, connectors and integrations the affected identity could reach until reviewed
- Suspend standing grants above the current task baseline, including cross-tenant and guest paths
- Review effective permissions of the affected identity and of every identity sharing its credentials
- Audit what the envelope permitted: enumerate the resources and destinations that were reachable, not only those that were used
- Record which grants are removed permanently versus restored, and who re-justified each restoration
Recurring mistakes
- Reviewing assigned roles instead of effective permissions
- Sharing one service credential across several agents or tasks
- Granting write or send rights to identities whose tasks are read-only
- Treating a new integration as a feature change rather than a privilege change
- Shortening token lifetime while leaving the standing privilege broad
- Keeping prototype-era grants after the task or project ended
- Relying on instructions to the model instead of platform-enforced scope
- Measuring least privilege once and never again
Standards and guidance referenced
- NIST
- CSRC glossary, least privilege definition, SP 800-53 Rev. 5, AC-6 Least Privilege (general control catalog)
- Microsoft
- Least privilege for AI agents with Microsoft Entra Agent ID (vendor guidance), Identity, Access, and Least Privilege (vendor guidance)
- OWASP
- Top 10 for Agentic Applications 2026, ASI03 Identity & Privilege Abuse (neighbouring risk framework)
On source use: the NIST definition and AC-6 are general, authoritative guidance and are not agent-specific; they are used for the principle, not for agent claims. The Microsoft pages are vendor guidance and are labelled as such, with product-specific behaviour not generalized. OWASP ASI03 is cited as a neighbouring risk framework for identity and privilege abuse, not as a least-privilege standard. No statistics or benchmark figures are claimed anywhere on this page. The request-side counterpart of this control is documented under agent authorization, and the attack-side motivation lives in the attack library.
Frequently Asked Questions
Is least privilege enough to stop prompt injection?
No. It does not reduce the probability of influence and it does not decide whether a concrete request is permitted. It bounds the consequences of everything else failing, including the authorization layer.
What is the difference between least privilege and agent authorization?
Least privilege governs how much authority exists at all: identities, scopes, tools, data and network reach, plus their lifetime and review. Agent authorization evaluates one fully resolved request against policy. A system needs both.
Why not just give the agent the user's permissions?
That grants the agent the user's full standing envelope for every task, with no task scoping, no separation of read and write, and no boundary the model's mistakes cannot cross. Delegation should hand over the slice the task needs, for as long as the task runs.
Are shared credentials acceptable if they are well protected?
Protection does not fix attribution or revocation. A shared credential cannot scope per agent, cannot attribute actions per caller and cannot be revoked for one consumer without breaking the rest.
Does a short-lived token solve the problem?
Only the credential-lifetime half. A short-lived token carrying a permanently broad role is broad standing authority that is re-issued continuously. Privilege lifetime - how long the grant should exist - is a separate clock.
How small should the tool set be?
As small as the current task class allows, with irreversible or external-effect tools separated from routine tasks. Unreviewed tools and integrations should be unavailable by default.
What is effective permission review?
Reviewing the union of what an identity can actually do - direct roles, inheritance, downstream credential entitlements, tool and integration permissions, cross-tenant paths - rather than the roles directly assigned.
Does least privilege conflict with productivity?
It trades standing convenience for bounded elevation. Routine tasks run under a narrow envelope; genuinely exceptional needs use time-bound, recorded elevation instead of permanent rights.
How often should grants be reviewed?
On a fixed cadence, and additionally whenever tools, data sources or workflows change. Usage telemetry should flag grants that have not been exercised within a defined window.
What should happen to agent privileges after a security incident?
Revoke and rotate affected credentials, disable reachable tools and integrations, suspend grants above baseline, review effective permissions of the affected identity and its credential sharers, and restore only what is re-justified.
References
- Least Privilege, glossary definitionNIST CSRC · StandardReviewed 2026-09-20
- SP 800-53 Rev. 5, AC-6 Least PrivilegeNIST · StandardReviewed 2026-09-20
- Least privilege for AI agents with Microsoft Entra Agent IDMicrosoft Learn · GuidanceReviewed 2026-09-20
- Identity, Access, and Least PrivilegeMicrosoft Learn · GuidanceReviewed 2026-09-20
- OWASP Top 10 for Agentic Applications 2026OWASP GenAI Security Project · GuidanceReviewed 2026-09-20