Permissions for cost data and cost controls in Microsoft Foundry

The cost experience in Microsoft Foundry brings together three kinds of data, and each one checks its own permission:

  • Cost, from Azure Cost Management: what you spend, at the prices you pay, by project, agent, and model deployment, and the month-end forecast.
  • Usage, from Azure Monitor metrics: tokens, runs, requests, tool calls, errors, and latency.
  • Cost controls, from Foundry: the budgets that send alerts on or block usage.

Each card on a page checks the permission for its own data. That's why someone can see an agent's token usage but not its cost. Use this article to find the role that each person needs, assign it at the right scope, and fix access messages.

What each permission unlocks

Permission What it lets people do Where it's used in the Foundry portal
Microsoft.CostManagement/query/read See cost. Every cost on Manage > Cost and Manage > Fleet, and the costs on a project's Monitor pages, including the costs of agents and model deployments
Microsoft.CostManagement/forecast/read See the month-end forecast. Manage > Cost, and Monitor > Cost in a project
Microsoft.Insights/metrics/read See usage. Manage > Operations, the activity cards on Manage > Fleet, and the token, run, and request counts on a project's Monitor pages
Microsoft.CognitiveServices/accounts/costControls/read and Microsoft.CognitiveServices/accounts/projects/costControls/read View cost controls and the budgets that apply to a project. The Cost Control tabs, the Cost controls card, and a project's budget card
Microsoft.CognitiveServices/accounts/costControls/write and .../costControls/delete Create, edit, and delete cost controls for a Foundry resource. Manage > Cost > Cost Control
Microsoft.CognitiveServices/accounts/projects/costControls/write and .../costControls/delete Create, edit, and delete cost controls for a project. Monitor > Cost Control in a project
Microsoft.PolicyInsights/*/read See policy violations. The policy cards on Manage > Fleet

To see how close each cost control is to its limit, people also need read access to the Application Insights resource that records usage for the Foundry resource's cost controls. For the role, see Azure roles.

Foundry roles

The Foundry roles include usage and cost controls, but not cost data. To see cost, people also need an Azure role with cost data, such as Cost Management Reader.

Role See usage View cost controls Create and manage cost controls
Foundry Account Owner Yes Yes For the Foundry resource and its projects
Foundry Owner Yes Yes For the Foundry resource and its projects
Foundry Project Manager Yes Yes For projects only
Foundry User Yes Yes No

Cost comes from Azure Cost Management, which checks access on the resource group or the subscription, not on the Foundry resource or project. To let someone see cost, assign Cost Management Reader:

  • On the resource group that contains the Foundry resource, to see a project's billed cost and forecast. Start here for people who work in a project.
  • On the subscription, to also see the costs of agents and model deployments, and cost across the subscription.

A role with cost data shows all the spending in its scope, not only Foundry spending. For details, see Choose the scope for cost data.

Important

The Foundry RBAC roles were recently renamed. Foundry User, Foundry Owner, Foundry Account Owner, and Foundry Project Manager were previously named Azure AI User, Azure AI Owner, Azure AI Account Owner, and Azure AI Project Manager. You might still see the previous names in some places while the rename rolls out. The role IDs and core permissions are unchanged by the rename.

For everything else that the Foundry roles allow, see Role-based access control for Microsoft Foundry.

Azure roles

Use Azure roles to give people cost data, which no Foundry role includes, and for people who need only part of the cost experience. For example, a finance analyst might need cost data without access to Foundry projects.

Role Use it to Scope to assign
Cost Management Reader See cost and forecasts, in the Foundry portal and in Azure Cost Management. Subscription or resource group
Cost Management Contributor See cost and forecasts, and create Azure Cost Management budgets and exports. Subscription or resource group
Monitoring Reader See usage, for example on Operations. Subscription, resource group, or Foundry resource
Reader See cost, usage, and cost controls. Reader also includes read access to every resource in its scope. Subscription or resource group
Owner or Contributor See usage and cost controls, and create and manage cost controls. At the resource group or subscription, they also show cost. Foundry resource or project, or the resource group or subscription
Log Analytics Reader or Monitoring Reader See usage against each cost control, which comes from Application Insights. The Application Insights resource that records usage for the Foundry resource's cost controls
EventGrid Contributor Connect a cost control to an Azure Event Grid topic so that it can send alerts. Event Grid topic
Owner or User Access Administrator Assign any of these roles. The scope that you assign

Permissions for each page

If you don't have the permission for a card, only that card shows an error, and the rest of the page loads. Owner and Contributor include every permission in the following tables.

Pages in Manage

These pages show data across a subscription. If you don't have read access to the subscription that you select, Manage > Cost shows No access instead of the page.

Page Cards and sections Permission Roles that include it
Cost > Overview Estimated cost, Spend over time, Spend breakdown, Highest spend assets, and the cost table, grouped by project, agent, or model Microsoft.CostManagement/query/read Cost Management Reader and Reader
Cost > Overview Month-end forecast Microsoft.CostManagement/forecast/read Cost Management Reader and Reader
Cost > Overview and Cost > Cost Control The Cost controls card and the list of cost controls Microsoft.CognitiveServices/accounts/costControls/read All Foundry roles, and Reader
Fleet Estimated cost, Top cost increases, and the Cost and Cost trend columns Microsoft.CostManagement/query/read Cost Management Reader and Reader
Fleet In current scope, Activity, Consumption, the error and latency lists, and the usage columns Microsoft.Insights/metrics/read All Foundry roles, Monitoring Reader, and Reader
Fleet Assets with policy violations and Most policy violations Microsoft.PolicyInsights/*/read All Foundry roles, and Reader
Operations All cards, charts, and lists Microsoft.Insights/metrics/read All Foundry roles, Monitoring Reader, and Reader

Pages in a project

These pages are under Build, on a project's Monitor page and on the Monitor tab of each agent and model deployment.

Page Cards and sections Permission Roles that include it
Monitor > Overview Agent runs and Total token usage Microsoft.Insights/metrics/read All Foundry roles, Monitoring Reader, and Reader
Monitor > Overview Estimated cost Microsoft.CostManagement/query/read on the subscription Cost Management Reader and Reader
Monitor > Cost Latest billed cost Microsoft.CostManagement/query/read on the resource group or subscription Cost Management Reader and Reader
Monitor > Cost Month-end forecast Microsoft.CostManagement/forecast/read on the resource group or subscription Cost Management Reader and Reader
Monitor > Cost Cost per successful run, and the costs in Cost by agent Microsoft.CostManagement/query/read on the subscription Cost Management Reader and Reader
Monitor > Cost Total token usage, and the tokens and invocations in Cost by agent Microsoft.Insights/metrics/read All Foundry roles, Monitoring Reader, and Reader
Monitor > Cost and Monitor > Cost Control The Project budget card, and the list of cost controls Microsoft.CognitiveServices/accounts/projects/costControls/read, plus Microsoft.CognitiveServices/accounts/costControls/read to see the Foundry resource's cost controls All Foundry roles, and Reader
Monitor > Cost Control Closest to limit (estimated), and usage in the details pane Read access to the Application Insights resource for the Foundry resource's cost controls Log Analytics Reader, Monitoring Reader, or Reader on that resource
Monitor > Cost for an agent or model deployment Costs Microsoft.CostManagement/query/read on the subscription Cost Management Reader and Reader
Monitor > Cost for an agent or model deployment Tokens, runs, and requests Microsoft.Insights/metrics/read All Foundry roles, Monitoring Reader, and Reader

Choose the scope for cost data

Azure Cost Management shows you the costs for the scope of your role assignment. The Foundry portal reads cost at the subscription, and a project's billed cost and forecast at the resource group or subscription. Assign roles for cost data at one of these scopes:

  • Subscription: every cost in the Foundry portal, for every Foundry resource in the subscription, including the costs of agents and model deployments. Use this scope for platform admins, FinOps practitioners, and anyone who needs agent and model costs.
  • Resource group: a project's Latest billed cost and Month-end forecast, on its Cost tab, for the Foundry resources in the resource group. It doesn't show the costs of agents and model deployments. Use this scope for developers and project leads.

A role with cost data that you assign only on a Foundry resource or a project doesn't show cost. Usage and cost controls work with roles at any of these scopes.

Role assignments can take a few minutes to take effect. If a card still doesn't load, sign out of the Foundry portal and sign in again.

Check that your billing account shows charges

If your organization has an Enterprise Agreement (EA) or a Microsoft Customer Agreement (MCA), a billing setting controls whether people with Azure roles can see charges. When the setting is off, people can't see costs in the Foundry portal or in Azure Cost Management, even with the right role.

Agreement Setting to turn on Who can turn it on
Enterprise Agreement Account owners can view charges An enterprise administrator
Microsoft Customer Agreement Azure charges, on the billing profile's Policies page A billing profile owner

For steps, see Enable access to costs in the Azure portal.

Assign a role

Assign roles in the Azure portal at the scope that you chose. Go to the subscription, resource group, or Foundry resource, select Access control (IAM) > Add > Add role assignment, choose the role, and select the people or groups. You need Owner or User Access Administrator at that scope. For the full steps, see Assign Azure roles using the Azure portal.

To give access at a billing scope, such as an EA enrollment or an MCA billing profile, see Assign access to Cost Management data.

Create a least-privilege custom role

If the built-in roles grant more access than you want, create a custom role with only the read permissions for the cost experience. The following role definition lets people see Foundry costs, forecasts, usage, cost controls, and policy violations across a subscription, without changing anything:

{
    "Name": "Foundry Cost Reader",
    "IsCustom": true,
    "Description": "View Foundry costs, forecasts, usage, cost controls, and policy violations.",
    "Actions": [
        "Microsoft.Consumption/*/read",
        "Microsoft.CostManagement/*/read",
        "Microsoft.Insights/metrics/read",
        "Microsoft.CognitiveServices/accounts/costControls/read",
        "Microsoft.CognitiveServices/accounts/projects/costControls/read",
        "Microsoft.PolicyInsights/*/read",
        "Microsoft.Resources/subscriptions/read"
    ],
    "NotActions": [],
    "DataActions": [],
    "NotDataActions": [],
    "AssignableScopes": [
        "/subscriptions/<subscription-id>"
    ]
}

Save the definition as foundry-cost-reader.json, and replace <subscription-id> with your subscription ID. Then create the role and assign it with the Azure CLI:

az role definition create --role-definition foundry-cost-reader.json

az role assignment create \
    --assignee "<user-or-group-object-id>" \
    --role "Foundry Cost Reader" \
    --scope "/subscriptions/<subscription-id>"

This role doesn't let people open Foundry projects. If they also need to open projects, assign Foundry User as well.

To create a custom role, you need Owner or User Access Administrator at the scope. Try the role in a nonproduction subscription before you roll it out. You can also create custom roles in the Azure portal or with Azure PowerShell.

Resolve access messages

Message or symptom Where What's missing Fix
No access: "You don't have permission to view this cost overview. Ask your administrator for the Reader role on the selected subscription, or equivalent access." Manage > Cost Read access to the selected subscription Ask for Reader on the subscription, or for a custom role like the one in Create a least-privilege custom role.
"Card name could not be loaded. Check your access to the selected projects and monitoring metrics, then try again." A card on a Manage page or a project's Monitor page The permission for that card Find the card in Permissions for each page, and ask for a role that includes its permission.
"Some project cost data is unavailable." Manage > Cost Cost data access for some of the Foundry resources in the scope Treat the values as partial. Ask for a role with cost data, such as Cost Management Reader, that covers those Foundry resources.
"This request requires permission on resource group name. Ask an administrator for Cost Management Reader or equivalent access at that scope." Latest billed cost and Month-end forecast on a project's Monitor > Cost tab Cost data access on the resource group that contains the Foundry resource. A role on only the project or the Foundry resource isn't enough. Ask for Cost Management Reader on that resource group.
"You need the Monitoring Reader permission to view these metrics." Manage > Operations Microsoft.Insights/metrics/read Ask for a Foundry role or Monitoring Reader.
Usage unavailable or Application Insights isn't connected Closest to limit (estimated) on a Cost Control tab An Application Insights resource for the Foundry resource's cost controls Ask an admin of the Foundry resource to select one under Usage data, or to select Connect.
Permission required Closest to limit (estimated) on a Cost Control tab Read access to the Application Insights resource for cost controls Ask for Monitoring Reader or Log Analytics Reader on that Application Insights resource.
Costs stay empty, even though you have the right role Any cost card Your billing account hides charges from people with Azure roles Ask your billing administrator to turn on the setting in Check that your billing account shows charges.