Defense control

Least Privilege

How to reduce the size, reach and lifetime of the authority an AI agent holds before any concrete action is evaluated: identities, roles, scopes, tool exposure, data access, elevation, review and revocation readiness.

By Norbert HofmannPublished: 2026-09-20Last reviewed: 2026-09-20Level: AdvancedAudience: Security Engineers, Developers, AI Engineers
Control family
Identity and authorization
Control type
Limiting, enforced outside the model
Core question
How much authority, identity, credential and resource reach should exist at all before any request is evaluated
Level
Advanced
Table of contents

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.

Where the authority envelope sits
SystemIdentity / Policy Context
Variable trustUser Task / Request Content
SystemAgent / Planner
SystemGranted Authority Envelope
SystemTool / Credential Reach
SystemDownstream Resource Scope
Variable trustResult / Effect

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.

01
FailureInfluenced behaviour

Injected or misleading content steers the plan. Its reach is exactly the reach the deployment granted.

02
FailureErroneous behaviour

No attack at all: a misunderstanding or hallucinated step is equally constrained by a narrow envelope.

03
FailureLateral reach

Broad identities, shared credentials and inherited permissions convert one affected component into many affected systems.

04
FailurePersistent advantage

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.

Two shapes of authority
PropertyStanding authorityTask-scoped authority
Exists whenAlwaysOnly while the task runs
Derived fromDeployment configuration and provisioningThe initiating principal and task context
Exposure windowUnboundedBounded by the task lifetime
Blast radius of misuseThe full standing envelopeAt most the task subset
Effort to operateLow to grant, high to reviewHigher 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.

Why identity granularity matters
PropertyShared credentialUnique workload identity
ScopeEverything the credential coversExactly what this agent needs
AttributionActions cannot be separated by callerEach action attributable to one identity
RevocationRevoking affects every consumerRevoking affects this agent only
ReviewImpossible to assess per consumerEffective 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.

01
PatternRead-only default identity

The identity used for retrieval and analysis holds no mutation rights; write-capable identities are separate and elevated only for tasks that need them.

02
PatternPer-resource write grants

Where writes are required, they are bound to specific resources or collections rather than the whole store.

03
PatternDraft instead of send

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 granularity
Scope levelReachTypical use
Organization or tenantEverything the tenant containsAlmost never justified for an agent
Workspace, project or siteOne bounded work areaThe default unit for agent tasks
Collection or folderA subset of a workspaceRoutine retrieval and processing tasks
Single resourceOne objectNarrowly 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.

01
DirectionCorpus narrowing

Restrict retrieval indices and file access to the collections the task class needs, with classification-aware boundaries for sensitive sets.

02
DirectionColumn and field narrowing

Where structured data is involved, expose the fields required rather than whole records or tables.

03
DirectionContent minimization at retrieval

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.

01
PropertyPurpose-bound

Elevation names the task it serves, so the elevated window is reviewable against a concrete need.

02
PropertyTime-bound

Elevation expires without action; forgetting to revoke is the normal case, so expiry must not depend on remembering.

03
PropertyRecorded

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.

Two independent lifetimes
PropertyCredential lifetimePrivilege lifetime
What expiresThe technical artifactThe authorization the artifact carries
Typical failureLong-lived secretsGrants that outlive the task or project that justified them
Bound byToken TTL, rotation, workload federationReview cadence, task end, ownership lifecycle
Short one is enough?No: broad standing privilege re-minted dailyNo: 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.

Two sources of authority to budget separately
AspectDelegated authorityWorkload authority
CeilingAt most a subset of the user's own rightsWhatever the service was granted
ShapeNarrow, task-shaped, expiringStanding, deployment-shaped
Least-privilege questionWhich slice of the user's rights does this task need?Which service-level rights does this deployment truly always need?
Misuse reachOne user's slicePotentially 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.

01Direct grantagent identity -> read role on workspace A
02Transitive reachworkspace A -> shared drive connector -> drive root -> export integration -> external destination
03What the review must answer

Not 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.

01
ControlNamed owner per grant

Every grant has an accountable owner who can say why it exists; grants without an owner are removal candidates.

02
ControlJustification with an end condition

Grants record the task or project they serve and end when it ends, or come up for review on a fixed cadence.

03
ControlRe-review on change

New tools, new data sources or new workflows trigger a review of effective permissions, not only of the new item.

04
ControlUsage-informed removal

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.

01
PropertyExplicit and separate

Exception credentials and grants are distinct from daily identities, so their use is unmistakable in telemetry.

02
PropertyTime-bound by construction

The exception expires; returning to baseline requires no cleanup action to be safe.

03
PropertyReviewed after every use

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.

Who owns which decision
ControlQuestion it answersNot its job
Least privilegeHow much identity, credential, tool, data and network reach exists at allEvaluating individual requests
Agent authorizationMay this concrete request execute, under whose authorityDeciding how much authority exists
Human-in-the-loopShould a person confirm this high-impact actionShrinking the standing envelope
Information flow controlMay this data reach this destinationDeciding what data or destinations are reachable at all
Network / egress restrictionsMay this connection or transfer proceedReducing which paths exist
Tool-chain analysisIs this sequence of actions unsafe in combinationThe size of any single grant
Sandboxing / containmentHow are execution effects isolated and cappedWhich 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.

01Task

An internal reporting agent is asked to summarize the contents of a shared project folder for a weekly status note.

02Influence

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.

03Configuration A: broad standing authority

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.

04Configuration B: least-privilege envelope

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.

05Observed difference

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.

06Remaining layer

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

Reading the comparison honestly
ClaimSupportedNot supported
The narrow envelope removed the influenced pathYes, for this configuration and this pathThat the deployment has no other reachable path
No data reached an external destinationYes, in configuration BThat configuration B can never leak by another route
Least privilege compensated for model influence hereYes, for this runThat it detects, prevents or reduces influence
The envelope was sufficient overallNot assessedAny 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.

The working set
  1. 01
    Identity inventory

    Every agent and workload identity, its owner, its purpose and its creation date.

  2. 02
    Grant inventory

    Roles, scopes, group memberships and resource grants per identity, including inherited ones.

  3. 03
    Tool and integration inventory

    Registered tools, connectors, automations and cross-tenant paths, each with its permissions and owner.

  4. 04
    Credential inventory

    Credential type, lifetime, rotation and the systems that accept it.

  5. 05
    Usage telemetry

    Which grants, tools and scopes were actually exercised, per identity and per time window.

  6. 06
    Review 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.

Least-privilege measures with explicit denominators
MeasureNumeratorDenominator
Unique Identity CoverageAgents acting under a dedicated identityAll deployed agents
Standing Write-Privilege RatioAgent identities holding standing write rightsAll agent identities
Cross-Tenant Reach CountAgent identities with any cross-tenant pathAll agent identities
Unreviewed Tool Exposure RateRegistered tools without a completed reviewAll registered tools
Effective-Permission Review CoverageIdentities with a current effective-access reviewAll agent identities
Stale-Grant ShareGrants unused beyond the defined windowAll grants in the inventory
JIT Elevation ShareElevated operations performed under time-bound elevationAll elevated operations
Revocation Completion TimeTime from withdrawal decision to enforcementReported 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

  1. Least Privilege, glossary definitionNIST CSRC · StandardReviewed 2026-09-20
  2. SP 800-53 Rev. 5, AC-6 Least PrivilegeNIST · StandardReviewed 2026-09-20
  3. Least privilege for AI agents with Microsoft Entra Agent IDMicrosoft Learn · GuidanceReviewed 2026-09-20
  4. Identity, Access, and Least PrivilegeMicrosoft Learn · GuidanceReviewed 2026-09-20
  5. OWASP Top 10 for Agentic Applications 2026OWASP GenAI Security Project · GuidanceReviewed 2026-09-20