Lesson 2 of 3 Securing Foundry Solutions

Applying Role-Based Access Control in Foundry

This lesson explains how Azure role-based access control (RBAC) assigns roles at a scope, and how Foundry's built-in roles separate management of resources from use of models and agents.

Learning outcomes

After completing this lesson, you will be able to:

  • Identify the Foundry built-in roles and their current names.
  • Distinguish control plane actions from data plane actions.
  • Apply least privilege by choosing the narrowest scope.
  • Diagnose a 403 error caused by a missing data plane role.

Built-in roles

A role is a named set of permissions, such as permission to call models or to create projects. A role assignment grants a role to a security principal, which can be a user, a group, a managed identity or a service principal, at a scope such as a subscription, resource group, resource or project. Built-in roles are roles that Microsoft defines and maintains for common job functions, so most solutions assign them rather than writing custom roles. Foundry has its own set of built-in roles.

Foundry's built-in roles were renamed in 2026: Azure AI User became Foundry User, Azure AI Project Manager became Foundry Project Manager, Azure AI Account Owner became Foundry Account Owner and Azure AI Owner became Foundry Owner. The role IDs and permissions did not change, and older names still appear in some places. A newer role, Foundry Agent Consumer, grants only the right to interact with agent endpoints and can be assigned at project scope or at the scope of a single agent.

Microsoft advises against assigning roles whose names start with Cognitive Services for Foundry work, because those roles were designed for individual Azure AI services resources; the exception is Cognitive Services Usages Reader at subscription scope, which lets users view quota. Older material and some questions still use Cognitive Services OpenAI User for inference-only access, and the role still authorizes calls to OpenAI model deployments, but Foundry User is the recommended data plane role for current Foundry solutions. The following table summarizes the roles that AI-103 scenarios use most.

RoleGrantsTypical assignee
Foundry Agent ConsumerInteract with agent endpoints only, at project or agent scopeEnd users and services that only call published agents
Foundry User (Azure AI User)Reader access plus data actions: build and test agents, call models and Foundry ToolsDevelopers, application identities, project managed identities
Foundry Project ManagerCreate and manage projects, build in them, publish agents and assign Foundry UserTeam leads
Foundry Account OwnerCreate resources and projects and manage deployments, without data actionsPlatform administrators
Foundry OwnerFull management plus data actions; assigns Foundry User, ACR and monitoring rolesSmall teams that self-serve
Cognitive Services Usages ReaderView quota and usage (subscription scope)Anyone who must see available quota
Search Index Data Reader / ContributorQuery or write Azure AI Search index dataApps querying; ingestion jobs
Search Service ContributorManage indexes, indexers and skillsetsSearch administrators, pipelines

The following screenshot shows the Foundry built-in roles on the Access control (IAM) page of a Foundry resource, filtered by name. Besides the renamed roles, the list includes two roles for interacting with agents at run time, Foundry Agent Consumer and a Foundry Project Runtime role.

Roles tab filtered by Foundry, listing Foundry Account Owner, Foundry Agent Consumer, Foundry Owner, Foundry Project Manager, a Foundry Project Runtime role and Foundry User
Foundry User is the usual data-plane role for developers; the owner and manager roles add management actions.
Sort into groups

Choose the Foundry role

Exam skills 1.3.4

Choose the least-privileged role for each identity.

Log in to try this activity Interactive activities are free with an account.

Control plane and data plane

Azure distinguishes control plane actions (creating resources, deployments and projects through Azure Resource Manager) from data plane actions (calling models, creating agents, querying indexes). Generic roles such as Contributor grant control plane permissions but not data actions, which is why a user with Contributor can create a deployment but receives a 401 or 403 error when calling it. Data plane access requires a role with the relevant data actions, such as Foundry User. Foundry Account Owner behaves the same way: it can create deployments and projects but cannot build agents or call models until a data plane role is added.

The following grid shows which actions each common role allows on each plane.

Roles compared by control plane actions through Azure Resource Manager (create projects, manage deployments) and data plane actions on the resource and project endpoints (call models and tools, build agents, call published agents). Contributor and Foundry Account Owner have only control plane rights, Foundry User and Foundry Agent Consumer only data plane rights, and Foundry Owner has both.
Control plane roles create resources, projects and deployments but cannot call them. A user with only Contributor or Foundry Account Owner therefore receives a 401 or 403 error when calling a model, until a data plane role such as Foundry User is added.
Sort into groups

Control plane or data plane?

Exam skills 1.3.4

Decide whether each action is a control plane or a data plane action.

Log in to try this activity Interactive activities are free with an account.

Least privilege

Roles are assigned at the narrowest scope that works: an agent rather than a project, a project rather than the resource, a resource rather than the resource group. Identities that only call a published agent receive Foundry Agent Consumer rather than Foundry User, because they do not need to create or modify agents. Agents themselves run tools with their own identity, which should receive only the permissions their tools require. Privileged Identity Management (PIM) provides just-in-time elevation for administrative roles.

Worked example

Fixing a 403 error

A developer with the Contributor role on a resource group creates a Foundry project and a model deployment, but the Python script that creates an agent fails with a 403 Forbidden error.

Contributor grants control plane permissions only. The developer needs a data plane role, such as Foundry User, on the project or resource. Granting Owner would also work but violates least privilege.

Check yourself

Which role lets a user call a published agent without building agents or calling models directly?

Show answer

Foundry Agent Consumer. Foundry User is needed to build agents and call models.

Exam Tips

Remember for the exam

  • Contributor manages resources but cannot call models or create agents; add Foundry User.
  • Building agents and calling models: Foundry User. Only calling a published agent: Foundry Agent Consumer.
  • Foundry Account Owner manages resources and deployments but has no data actions.
  • Assign roles at the narrowest scope that works.