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:

Per-subscription loop (bash + az rest)
# 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:

Endpoint swap
// 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?
No. Microsoft's scopes documentation states the Cost Details API "doesn't support management groups for either EA or MCA customers." Management group cost queries in the portal are also unsupported for CSP. Cross-subscription aggregation via that API is a client-side exercise on every agreement type — CSP just removes the billing-scope alternatives.
Will my existing scripts work against the replacement endpoint?
Most do, with a URL change. CSP Continuity's query endpoint accepts the same request body as Microsoft's Cost Management Query API and returns the same {id, name, type, properties: {columns, rows}} response shape, so parsing code is unaffected. Authentication switches to Azure AD against your deployed app.
What about rate limits when looping subscriptions myself?
The Cost Management APIs throttle per client and return 429 responses with Retry-After headers when you exceed them. A loop over many subscriptions should serialize or batch requests and honor Retry-After. This is one of the plumbing costs of the DIY loop: backoff, paging via nextLink, and partial-failure handling are yours to build and maintain.
Can I group by more than two dimensions?
Microsoft's Query API limits grouping to two dimensions per request. CSP Continuity's consolidated endpoint accepts unlimited grouping dimensions against the same request format, because it queries a local SQL database rather than the per-subscription service.

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

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.