Forum Discussion
Azure Cost Management API & Power BI – Permissions, data access, and historical analysis
- 7 months ago
Hi akim_no , Thank you for reaching out to the Microsoft Community Forum.
This is a scope and billing-model mismatch, not a misconfiguration in Power BI. Azure Cost Management APIs are strictly scope-bound. You can query either subscription scope or billing account / billing profile scope, but you cannot mix them in a single request. The 404 you see on the CostManagement/query call is caused by an invalid ARM path where subscription scope is effectively nested under a billing account. That endpoint will always fail, even with correct permissions. Separately, several tables exposed under the billing account scope (for example balance or credits) rely on Consumption APIs that are not supported for all billing models (especially MCA), so Power BI shows them in Navigator but they return 404 or empty results at runtime. That is expected.
Permissions also have to align with scope. Subscriptionlevel cost queries require Cost Management Reader on the subscription. Billing account level queries require Billing Reader or Cost Management Reader at the billing account or billing profile. Having access at one scope does not imply access at the other. Empty Usage details previews usually mean you are connected at a billing scope where usage is not exposed the same way or there is no finalized invoice yet, this is common and not an error.
For architecture, the native Power BI Azure Cost Management connector is fine for exploration and short term analysis, but it is not designed for reliable historization. Microsoft’s supported pattern for long term, scalable cost analytics is Cost Management Exports to storage (ADLS/Blob), optionally processed via Data Factory or similar and then consumed by Power BI. If your goal is monthly trends over years with stable schemas and predictable refresh, exports are the correct and supported solution.
Microsoft Cost Details API now generally available for EA and MCA customers | Microsoft Azure Blog
Tutorial - Create and manage Cost Management exports - Microsoft Cost Management | Microsoft Learn
Azure Cost Management connector - Power Query | Microsoft Learn
This is the documentation I followed to connect to the API, but I’m having issues retrieving data and I’m not sure what I’m missing.