Skip to content
AI Agent Access Control

Five agent authorization patterns scope an agent: a role per agent, a role per tool, a session policy, a token exchange and a conditioned resource policy

Five authorization patterns scope an AI agent in a cloud account: a dedicated role per agent, a role per tool, session policies that scope down credentials, on-behalf-of token exchange, and resource-based policies with conditions. Each has a documented mechanism in AWS, Azure or Google Cloud, read on 16 Nov 2026.

See the ranking ยท All guides

The five patterns at a glance

PatternAWS mechanismAzure mechanismGoogle Cloud mechanism
Dedicated role per agentOne IAM role per agent, trust scoped to the service and source ARNOne Entra agent identity per agent, created with the agent in FoundryOne agent identity principal per agent, instead of a shared service account
Role per toolA separate execution role for each Lambda function that implements a toolRBAC assigned to the identity each tool usesA service account chosen per tool (documented for Dialogflow CX tools)
Session policy or scoped credentialsSession policy passed to AssumeRole, up to 10 managed policiesRole assignment at resource scope, with a conditionScoped OAuth delegation for the user's access
On-behalf-of token exchangeAgentCore Gateway token exchange; GetWorkloadAccessTokenForJWTEntra on-behalf-of flow with delegated scopesDelegated identity with 3-legged OAuth
Resource policy with conditionsResource-based and endpoint policies with condition keysAzure ABAC role assignment conditionsDeny policies and IAM conditions

A dedicated role per agent

The pattern: each agent runs as its own identity, so a grant to one does not reach another and the logs name it. On AWS, a Bedrock agent runs under a service role whose trust policy names bedrock.amazonaws.com (AWS: service role for Bedrock Agents), and the Q Business plugin role example scopes its trust policy with aws:SourceAccount and aws:SourceArn conditions (AWS: plugin role). On Azure, Microsoft documents that creating a Foundry agent provisions a unique agent blueprint and an identity for its default instance. On Google Cloud, Google recommends the per-agent identity over the shared default service agent. See the own-identity check and the trust check.

A role per tool

The pattern: the agent's own identity can invoke tools but holds no data permissions, and each tool function runs under a narrow role of its own. AWS documents that a Lambda function runs under its execution role (AWS: Lambda execution role), so a tool built as a function can carry its own. Google documents that a Dialogflow CX tool can authenticate as a service account that you create and grant roles (Google Cloud: Dialogflow CX tools). The compromise of the agent then does not hand over what the tools hold. The cost is more roles to review. The per-tool role check covers the setup, and self-hosted agents on AWS show the Lambda case.

Session policies and scoped-down credentials

The pattern: when the agent obtains temporary credentials, the request itself carries a smaller policy. AWS documents that session policies are passed as a parameter when creating a temporary session, that the session's permissions are the intersection of the role's identity-based policies and the session policies, and that a call can pass one inline document or up to 10 managed policy ARNs (AWS: policies and permissions in IAM). This lets an orchestrator hand each task only what that task needs. A per-call session policy parameter on Azure or Google Cloud: none found on 16 Nov 2026 in the pages read. The documented moves there are narrow scopes and conditions on the role assignment or binding.

On-behalf-of token exchange

The pattern: the agent trades the user's inbound token for a downstream token that carries both identities. AWS documents this as the token exchange grant in AgentCore Gateway: the exchanged token carries the user's identity and the agent's identity, so downstream services can authorize at every hop without more consent flows (AWS: Gateway outbound authorization). Microsoft's on-behalf-of flow passes the user's identity and uses delegated scopes only (Microsoft: on-behalf-of flow). Google describes a delegated identity that combines the user and the agent (Google Cloud: identity delegation architecture). The user-or-agent check decides which tools use it.

Resource-based policies with conditions

The pattern: the data side refuses calls that do not match, whatever the agent's role holds. AWS documents resource-based policies, including S3 bucket policies, and VPC endpoint policies that restrict which principals can use an endpoint (AWS: VPC endpoint policies). Microsoft documents role assignment conditions that can require, for example, a blob to carry a specific tag (Microsoft: Azure ABAC). Google documents deny rules whose conditions decide whether a rule applies (Google Cloud: deny policies). See the condition check and the authorization page.

Sources

  1. AWS: policies and permissions in IAM, read 16 Nov 2026
  2. AWS: VPC endpoint policies, read 16 Nov 2026
  3. AWS: AgentCore Gateway outbound authorization, read 16 Nov 2026
  4. AWS: create a service role for Amazon Bedrock Agents, read 16 Nov 2026
  5. AWS: IAM role for Amazon Q Business plugins, read 16 Nov 2026
  6. AWS: Lambda execution role, read 16 Nov 2026
  7. Microsoft: agent identity concepts in Foundry, read 16 Nov 2026
  8. Microsoft: Azure ABAC and role assignment conditions, read 16 Nov 2026
  9. Microsoft: OAuth 2.0 on-behalf-of flow, read 16 Nov 2026
  10. Google Cloud: agent identity on Agent Runtime, read 16 Nov 2026
  11. Google Cloud: identity delegation architecture, read 16 Nov 2026
  12. Google Cloud: deny policies, read 16 Nov 2026
  13. Google Cloud: Dialogflow CX tools, read 16 Nov 2026

Last reviewed 16 Nov 2026.