Azure Cost Management API: Scope Not Supported Under CSP — Querying Across Subscriptions
Under EA and direct MCA you can query cost at billing account, department, or management group scope. Under CSP, billing scopes live in the partner's tenant and management group scope is unsupported — every Cost Management API call must target a single subscription. Cross-subscription reporting means looping every subscription and unifying results yourself, or using a tool that does it for you.
Which scopes actually work under CSP?
Microsoft's Cost Management scopes documentation draws the map. Billing scopes — billing account, department, enrollment account, billing profile — exist under the partner's Microsoft Partner Agreement, in the partner's tenant. Management group scope is explicitly unsupported: "Cost Management doesn't support Management groups in CSP scopes," and the Cost Details API "doesn't support management groups for either EA or MCA customers" — so there's no agreement type where the API aggregates a management group for you. What's left for a CSP customer is the Azure RBAC scopes: subscription and resource group, one at a time.
If your tooling calls billing-account or department scope URLs from your EA/MCA days, those calls now fail with authorization errors — not because your service principal lost a role, but because the scope itself is no longer in your tenant.
How do you query across subscriptions anyway?
Option 1: loop the subscriptions yourself (free, plumbing included)
The per-subscription pattern is straightforward to start:
# The DIY pattern: query every subscription, merge client-side
subs=$(az account subscription list --query "[].subscriptionId" -o tsv)
for sub in $subs; do
az rest --method post \
--url "https://management.azure.com/subscriptions/$sub/providers/Microsoft.CostManagement/query?api-version=2023-11-01" \
--body '{
"type": "ActualCost",
"timeframe": "MonthToDate",
"dataset": {
"granularity": "Daily",
"aggregation": { "totalCost": { "name": "Cost", "function": "Sum" } }
}
}' >> merged-results.jsonl
done
# ...then handle paging (nextLink), 429 backoff, schema merge, and storage yourself
For a one-off answer, this is fine — run it, merge in a spreadsheet or a script, done. As a standing
pipeline it grows the usual appendages: paging via nextLink, 429 backoff with
Retry-After, schema normalization across API versions, a database or storage layer,
scheduling, monitoring, and handling subscriptions that appear and disappear. Reservation amortization
also stays invisible at these scopes — rebuilding it is a
separate project.
Option 2: point your tooling at a consolidated, compatible endpoint
CSP Continuity runs that loop for you daily, stores results in a SQL database in your tenant, and exposes a single query endpoint that speaks Microsoft's dialect:
// Before — Microsoft Cost Management API (per subscription only under CSP)
POST https://management.azure.com/subscriptions/{subId}/
providers/Microsoft.CostManagement/query
// After — CSP Continuity (consolidated across all subscriptions)
POST https://<your-app>.azurewebsites.net/
api/costmanagement/query
The request body format is Microsoft's, and responses come back in Microsoft's exact
{id, name, type, properties: {columns, rows}} shape — so existing scripts, dashboards,
and integrations built against the Cost Management Query API are designed to work with a URL change.
Because queries hit a local database rather than the per-subscription service, results span all
subscriptions at once and grouping isn't limited to Microsoft's two dimensions.
Frequently asked questions
Does the Cost Details API support management group scope on any agreement type?
Will my existing scripts work against the replacement endpoint?
What about rate limits when looping subscriptions myself?
Can I group by more than two dimensions?
The maintained alternative
CSP Continuity deploys from the Azure Marketplace in about 5 minutes, needs one 2-minute PowerShell script, and starts collecting consolidated cost data within hours — entirely inside your tenant.
Related guides
- Fix: "Management group does not have any valid subscriptions" in Azure Cost Management
Why this Cost Analysis error appears for CSP subscriptions, and every way to get a consolidated cost view back.
- Power BI Azure Cost Management Connector Returns No Data Under CSP — Why, and What to Do
The built-in connector does not support CSP agreements. What your options are for getting cost data back into Power BI.
- Reserved Instance Amortized Cost Shows $0 at Subscription Scope — CSP Explanation and Fix
Why reservation costs appear as $0 for CSP customers, and how to rebuild amortization and unused-capacity visibility.
Last updated: July 15, 2026. CSP Continuity is designed to work across a wide range of Azure environments. Results may vary based on tenant configuration, Microsoft API availability, and CSP partner setup. See our Terms of Use for details. Microsoft, Azure, and Power BI are trademarks of Microsoft Corporation. This page describes documented behavior of Microsoft services and links to official Microsoft documentation.