Repository navigation
Agent Costs Setup
In this section: Power Platform Access
The Agent costs page in the web portal shows what Microsoft billed for your Copilot Studio agents (Copilot Credits), plus optional Azure spend. It stays empty until you switch on at least one of two opt-in imports and grant the permissions below.
Stable 1852, published 14 October 2026: Copilot Studio consumption requires a durable delegated billing-administrator connection. Capacity remains app-only. Stable build 1850 has no connection page; its app-only consumption refusals are not resolved merely by repeating a Reader-role assignment.
Both imports are off by default. The installer's Test Configuration does not check them, so confirm the result after the first import cycle (step 5).
| Import | Installer checkbox | Where the data comes from | What you must grant |
|---|---|---|---|
| Copilot Studio credits | Copilot Studio credits | Power Platform licensing API | Consumption: delegated permissions/consent and connected administrator. Capacity: Power Platform Reader for the runtime enterprise application |
| Azure costs | Azure costs | Azure Cost Management |
Cost Management Reader on each scope, plus the AzureCostScopes app setting |
Both run once a day by default, so allow a full cycle before expecting figures.
"The runtime app registration" is the Entra ID app registration the importer signs in with. See App registrations setup if you need to find or recreate it.
With the installer: tick Copilot Studio credits and/or Azure costs on the Targets tab, then install or upgrade.
Manually: in the Azure portal, open the App Service for the solution, then Settings → Environment variables → App settings and edit ImportJobSettings. It is a ;-separated list of flags. Add the ones you want, keeping what is already there:
...existing flags...;CopilotStudioCredits=True;AzureCostManagement=True
Save, then restart the App Service so the importer picks it up. See Configuration reference → What to import for the full list of flags.
Until one flag is on, the portal page says neither import is switched on.
Skip this step if you only want Azure costs. Copilot Studio credits need two separate grants, both described on Agent Costs Power Platform Access:
- Consumption (credits used per agent and per person) needs a billing administrator connected through the portal's delegated connection. There is no app-only alternative. See Consumption: connect the billing administrator.
- Capacity (the tenant's entitlement and remaining credits) needs the Power Platform Reader role for the runtime enterprise application, which is app-only. See Capacity: grant the runtime enterprise application Reader.
A scope is the part of Azure whose costs you want: a subscription, a resource group, or a management group. Choose the one that contains your Copilot Credit billing. Pay-as-you-go Copilot Credits are billed to an Azure subscription through a billing policy, so that subscription is the usual choice. A scope looks like this:
/subscriptions/00000000-0000-0000-0000-000000000000
/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso-rg
To see which subscription your Copilot Credits are billed to, check Cost Management → Cost analysis in the Azure portal and look for the Microsoft Copilot Studio service.
Microsoft's documentation: Assign Azure roles using the Azure portal. You need Owner, User Access Administrator or Role Based Access Control Administrator on the scope.
- In the Azure portal, open the scope (for example Subscriptions → your subscription).
- Select Access control (IAM) → Add → Add role assignment.
- On Role, search for and select Cost Management Reader, then Next.
- On Members, choose User, group, or service principal, click Select members, search for the runtime app registration's name, select it, then Select.
- Review + assign. Repeat for each scope.
For Enterprise Agreement or Microsoft Customer Agreement billing accounts, the role is assigned in the billing portal instead, and the "AO view charges" (EA) or "Azure charges" (MCA) policy must be on. See Assign access to Cost Management data.
In the Azure portal, open the App Service → Settings → Environment variables → App settings and add AzureCostScopes, set to the scope(s) separated by ;. With no scope the import does not run. There is no default. Restart the App Service afterwards.
Optional application settings:
| Setting | Default | Meaning |
|---|---|---|
AzureCostMeterFilterValues |
(empty: every meter) | Values to narrow the import to. Pay-as-you-go Copilot Credits (Cowork, Copilot Studio and Work IQ API together) are billed under the Microsoft Copilot Studio service. |
AzureCostMeterFilterDimension |
ServiceName |
What the filter values match against. MeterCategory and Meter also work. |
AzureCostGroupBy |
ResourceId;Meter |
Up to two dimensions; extras are ignored. TagKey:<tag name> groups by a tag, which is the only way to tell Cowork apart from Copilot Studio. It uses one of the two slots. |
AzureCostTrailingWindowDays |
5 |
How many days back each run re-reads. Azure keeps amending a billing period for about five days after it ends. |
AzureCostIntervalHours |
24 |
Minimum hours between runs. 0 removes the limit. |
Azure costs are estimates until Microsoft closes the billing period. They can't be attributed to individual people, because Azure bills by resource.
Per-person credit rows need the See PII portal role. Aggregate figures are visible to every signed-in user. See Security & permissions model.
After one import cycle, open Insights → Agent costs. If the page is empty it says why:
| Message | What to do |
|---|---|
| Neither agent cost import is switched on | Do step 1. |
| Consumption says connection required or reconnect needed | Complete or renew the delegated connection in step 2; do not broaden the app-only role |
| Copilot Studio credit import is failing | Inspect each consumption/capacity log outcome and the matching identity. A verified role or sign-in alone is not import success |
| Import ran but found no billed agent usage | Normal for a tenant with no Copilot Studio agents, or none that have used credits yet. |
| Azure cost import is failing, or has not stored anything yet | Check the role in step 3b and AzureCostScopes in step 3c. |
| Query matched no spend | The meter filter matches nothing. Compare it with a cost export from the same scope. |
- Copilot analytics overview
- Copilot Adoption user guide
- Copilot Adoption setup (admins)
- Work Trend Index
- Copilot investment
- Copilot spend
- Agent costs
- Prompt categories
- Copilot credit history (preview)
- Agent 365 package catalog
- The Copilot data in depth
- Prerequisites
- App registrations setup
- Install with the installer
- Verify the deployment
- Security & permissions model
- Private endpoints (optional)
- Certificate authentication (optional)
- Manual installation
- Activity & usage analytics (Power BI)
- SharePoint page tracking