# 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

Facts read 16 Nov 2026. Page reviewed 16 Nov 2026.

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.

## The five patterns at a glance

| Pattern | AWS mechanism | Azure mechanism | Google Cloud mechanism |
| --- | --- | --- | --- |
| Dedicated role per agent | One IAM role per agent, trust scoped to the service and source ARN | One Entra agent identity per agent, created with the agent in Foundry | One agent identity principal per agent, instead of a shared service account |
| Role per tool | A separate execution role for each Lambda function that implements a tool | RBAC assigned to the identity each tool uses | A service account chosen per tool (documented for Dialogflow CX tools) |
| Session policy or scoped credentials | Session policy passed to AssumeRole, up to 10 managed policies | Role assignment at resource scope, with a condition | Scoped OAuth delegation for the user's access |
| On-behalf-of token exchange | AgentCore Gateway token exchange; GetWorkloadAccessTokenForJWT | Entra on-behalf-of flow with delegated scopes | Delegated identity with 3-legged OAuth |
| Resource policy with conditions | Resource-based and endpoint policies with condition keys | Azure ABAC role assignment conditions | Deny 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](https://docs.aws.amazon.com/bedrock/latest/userguide/agents-permissions.html)), and the Q Business plugin role example scopes its trust policy with aws:SourceAccount and aws:SourceArn conditions ([AWS: plugin role](https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/plugin-iam-role.html)). 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](/checklist/own-identity-per-agent/) and [the trust check](/checklist/scope-trust-to-the-agent/).

## 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](https://docs.aws.amazon.com/lambda/latest/dg/lambda-intro-execution-role.html)), 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](https://cloud.google.com/dialogflow/cx/docs/concept/playbook/tool)). 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](/checklist/tool-own-role/) covers the setup, and [self-hosted agents on AWS](/agent-platforms/self-hosted-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](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html)). 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](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/gateway-outbound-auth.html)). Microsoft's on-behalf-of flow passes the user's identity and uses delegated scopes only ([Microsoft: on-behalf-of flow](https://learn.microsoft.com/en-us/entra/identity-platform/v2-oauth2-on-behalf-of-flow)). Google describes a delegated identity that combines the user and the agent ([Google Cloud: identity delegation architecture](https://docs.cloud.google.com/gemini-enterprise-agent-platform/govern/identity-delegation-architecture)). [The user-or-agent check](/checklist/decide-user-or-agent-authority/) 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](https://docs.aws.amazon.com/vpc/latest/privatelink/vpc-endpoints-access.html)). Microsoft documents role assignment conditions that can require, for example, a blob to carry a specific tag ([Microsoft: Azure ABAC](https://learn.microsoft.com/en-us/azure/role-based-access-control/conditions-overview)). Google documents deny rules whose conditions decide whether a rule applies ([Google Cloud: deny policies](https://cloud.google.com/iam/docs/deny-overview)). See [the condition check](/checklist/condition-based-data-access/) and [the authorization page](/ai-agent-authorization/).

## Related pages

- [Amazon Q Business default permissions: roles it creates](/default-permissions/amazon-q-business/)
- [Copilot Studio default permissions: tool authentication](/default-permissions/copilot-studio/)
- [Azure OpenAI Assistants default permissions and access](/default-permissions/azure-openai-assistants/)
- [All of them](/guides/)

## Sources

- AWS: policies and permissions in IAM: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html (read 16 Nov 2026)
- AWS: VPC endpoint policies: https://docs.aws.amazon.com/vpc/latest/privatelink/vpc-endpoints-access.html (read 16 Nov 2026)
- AWS: AgentCore Gateway outbound authorization: https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/gateway-outbound-auth.html (read 16 Nov 2026)
- AWS: create a service role for Amazon Bedrock Agents: https://docs.aws.amazon.com/bedrock/latest/userguide/agents-permissions.html (read 16 Nov 2026)
- AWS: IAM role for Amazon Q Business plugins: https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/plugin-iam-role.html (read 16 Nov 2026)
- AWS: Lambda execution role: https://docs.aws.amazon.com/lambda/latest/dg/lambda-intro-execution-role.html (read 16 Nov 2026)
- Microsoft: agent identity concepts in Foundry: https://learn.microsoft.com/en-us/azure/ai-foundry/agents/concepts/agent-identity (read 16 Nov 2026)
- Microsoft: Azure ABAC and role assignment conditions: https://learn.microsoft.com/en-us/azure/role-based-access-control/conditions-overview (read 16 Nov 2026)
- Microsoft: OAuth 2.0 on-behalf-of flow: https://learn.microsoft.com/en-us/entra/identity-platform/v2-oauth2-on-behalf-of-flow (read 16 Nov 2026)
- Google Cloud: agent identity on Agent Runtime: https://docs.cloud.google.com/gemini-enterprise-agent-platform/scale/runtime/agent-identity (read 16 Nov 2026)
- Google Cloud: identity delegation architecture: https://docs.cloud.google.com/gemini-enterprise-agent-platform/govern/identity-delegation-architecture (read 16 Nov 2026)
- Google Cloud: deny policies: https://cloud.google.com/iam/docs/deny-overview (read 16 Nov 2026)
- Google Cloud: Dialogflow CX tools: https://cloud.google.com/dialogflow/cx/docs/concept/playbook/tool (read 16 Nov 2026)

Last reviewed 16 Nov 2026. Canonical: https://aiagentaccesscontrol.com/agent-authorization-patterns/
