# AI agent permissions should be written from what the tools call, then trimmed with usage data, not copied from a starter

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

AI agent permissions start too wide when a starter role or broad managed policy gets the agent working fast. This guide shows how to write the policy from the tools' real calls, set a ceiling above it, remove unused grants and test changes, with each cloud's documented mechanism.

## Start from what the tools call, not from the starter policy

Least privilege for an agent begins with a list: every API call the agent's tools can make, with the resources each call touches. The policy is written from that list ([check](/checklist/least-privilege-policy/)). Starter material does the opposite. AWS documents that the BedrockAgentCoreFullAccess managed policy grants broad permissions and recommends a custom policy with only what the application needs. For deployment, AWS says to use broad permissions only for development and testing, and to create custom policies for production. A policy built from the tool list is shorter, and it makes a hijacked tool call fail at the cloud instead of succeeding quietly.

## Each platform starts the agent with a different amount

The starting point differs. On [Foundry Agent Service](/agent-platforms/foundry-agent-service/), Microsoft documents that a new agent identity starts without resource permissions and that Foundry assigns no RBAC roles to it. For people who only call agents, Microsoft names Foundry Agent Consumer as the least-privilege role. On [Agent Runtime](/agent-platforms/agent-runtime-gcp/), an agent with agent identity starts with the Agent Default Access role, covering basic project-wide logging and model calling, and the Agent Context Editor role, limited to its own sessions, memories and sandboxes. On [Bedrock Agents Classic](/agent-platforms/bedrock-agents/), the documented service role policy covers invoking named foundation models, reading the schema objects in S3 and querying attached knowledge bases.

AWS tells you to narrow it further. Its Bedrock guidance says to replace the wildcard with specific agent IDs once the agents exist, and the same habit applies to every resource ARN in the policy ([check](/checklist/narrowest-scope/)). Microsoft gives the same advice for Azure RBAC: avoid assigning broader roles at broader scopes, even when that seems more convenient. Whatever the starting point, the tools matter as much as the agent: give each tool function its own narrow role instead of the agent's role ([check](/checklist/tool-own-role/)).

## Set a ceiling above the role, because role policies get edited

A role's own policy can be widened by whoever administers the account. A ceiling set higher in the hierarchy still holds when that happens ([check](/checklist/set-permission-ceiling/)). AWS documents service control policies as specifying the maximum available permissions for IAM roles in an organization, and permissions boundaries as setting the maximum an identity-based policy can grant to a role. Google documents Principal Access Boundary policies as defining the resources a principal may access. For Azure, Microsoft documents that customer-managed deny assignments are in private preview, and that management groups let you apply governance conditions above subscriptions. Pair the ceiling with an explicit deny of IAM changes and destructive actions ([check](/checklist/deny-iam-changes-and-destructive-actions/)). How to write those policies is the work of other references; here the review only needs to see that one exists.

## Scope the grant by resource and by condition

A role granted on a whole account, project or subscription covers every resource in it, including ones created later. Each cloud documents a way to narrow that. AWS documents attribute-based access control, where tags on IAM entities and resources are the attributes ([check](/checklist/condition-based-data-access/)). Google documents IAM Conditions, which make a role binding apply only when the conditions are met. Microsoft documents Azure role assignment conditions, which add attribute-based filtering to a role assignment. Where the agent reads data, a condition keyed on a tag means a new data store does not become reachable by default, which a list of resource names cannot promise once it goes stale.

## Trim with usage data after the agent has run

Permissions granted during a pilot tend to stay. Each cloud documents a tool for finding the unused part ([check](/checklist/remove-unused-permissions/)). AWS describes IAM Access Analyzer unused access analyzers as helping identify unused access. Google documents IAM role recommendations as helping you identify and remove excess permissions. Microsoft documents Entra access reviews as a way to manage role assignments on a recurring basis. Schedule the first trim for a set number of weeks after launch, with an owner named in the review. An agent's real call pattern is clear only once it has handled real traffic, and the grants it never used are the cheapest to remove.

## Test each change before it is enforced

Tightening an agent's access can break a tool in ways nobody saw coming, so test first ([check](/checklist/test-before-enforcing/)). AWS documents the IAM policy simulator for testing identity-based policies. Google documents organization policies in dry-run mode, which monitor how a policy would behave without enforcing it. Microsoft documents the enforcementMode property on an Azure Policy assignment, where DoNotEnforce lets you see the outcome on existing resources without initiating the policy effect. Keep the result of each test with the review record. The [full checklist](/checklist/) lists the other 29 checks, and [the map](/map/) shows what each platform grants by default.

## Related pages

- [Amazon Bedrock agent permissions: roles, trust and what the console creates](/guides/bedrock-agent-permissions/)
- [Vertex AI agent service account: Agent Runtime identities in Google Cloud](/guides/vertex-ai-agent-service-account/)
- [What can an AI agent access in AWS: the four layers to read](/guides/what-can-an-ai-agent-access-in-aws/)
- [All of them](/guides/)

## Sources

- AWS: IAM permissions for AgentCore Runtime: https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/runtime-permissions.html (read 10 Nov 2026)
- AWS: create a service role for Amazon Bedrock Agents: https://docs.aws.amazon.com/bedrock/latest/userguide/agents-permissions.html (read 10 Nov 2026)
- AWS: IAM Access Analyzer: https://docs.aws.amazon.com/IAM/latest/UserGuide/what-is-access-analyzer.html (read 10 Nov 2026)
- Google Cloud: IAM recommender overview: https://cloud.google.com/iam/docs/recommender-overview (read 10 Nov 2026)
- Google Cloud: Principal Access Boundary policies: https://cloud.google.com/iam/docs/principal-access-boundary-policies (read 10 Nov 2026)
- Microsoft: Azure RBAC best practices: https://learn.microsoft.com/en-us/azure/role-based-access-control/best-practices (read 10 Nov 2026)
- Microsoft: Azure Policy assignment structure: https://learn.microsoft.com/en-us/azure/governance/policy/concepts/assignment-structure (read 10 Nov 2026)

Last reviewed 16 Nov 2026. Canonical: https://aiagentaccesscontrol.com/guides/least-privilege-for-ai-agents/
