The Azure PAYG API Shift: What’s Actually Changing (and Why It Matters)
- Shannon
- 11 hours ago
- 4 min read
If you pull cost data from Azure’s Pay-As-You-Go (PAYG) subscriptions, you might have noticed something new in Microsoft’s documentation lately: the legacy “Get Usage Details” API is being deprecated.
That’s right. The familiar Consumption API that so many FinOps teams built automations around is heading for retirement.
Before you start rewriting every script you own, take a breath. This change is not a disaster. It is an upgrade. Let’s talk about what is happening, why Microsoft is doing it, and what you actually need to prepare for.
The Short Version
Microsoft is not getting rid of PAYG. They are modernizing how PAYG data is accessed.
The old Consumption-based Usage Details API is being phased out. In its place, Microsoft is rolling out two supported paths for cost and usage retrieval:
Cost Details API for Enterprise and Microsoft Customer Agreement subscriptions
Exports API for PAYG and Visual Studio subscriptions
Think of it as moving from a “pull” model to a “subscribe” model. Instead of constantly hitting the API to grab data, you let Azure deliver cost data directly to you.
Key Microsoft Documentation
Why This Is Happening
The short answer is scale, consistency, and modernization.
The old Usage Details API came from a time when cost datasets were smaller, billing models were simpler, and PAYG was mostly used for development and testing. As Azure usage grew, that API started to show its limits. Teams ran into throttling, inconsistent schemas, and separate logic for every offer type such as EA, CSP, and PAYG.
Microsoft needed something that could handle real enterprise scale and align across all billing models.
The new APIs are designed to:
Support large datasets without timing out
Use consistent schemas for all subscription types (::cough:: FOCUS ::cough::)
Integrate better with FinOps tools and data platforms
Include reservations, savings plans, and tag data in a single export
The Cost Details API and Exports API were built to meet these goals. They are made for automation at scale and for long-term FinOps maturity.
So What’s Going Away
The legacy Consumption endpoint /providers/Microsoft.Commerce/UsageAggregates is being deprecated. If you still have scripts, connectors, or dashboards that point to the endpoint, they will eventually stop working once Microsoft retires the API.
For now, it is still live, but officially unsupported. Microsoft’s guidance is simple: migrate now, now, NOW! Although they will also likely extend the date as humans are sometimes why we can't have nice things.
PAYG customers should move to the Exports API. It allows you to schedule cost data exports directly to an Azure Storage Account. The data is written as CSV files that can be ingested into Power BI, Azure Data Factory, or a warehouse.
Enterprise and MCA customers can use the Cost Details API, which provides a consistent, asynchronous way to retrieve detailed cost data.
The Modern Options
Here is how it breaks down:
Subscription Type | Legacy API | Modern Replacement | Supported Today |
Pay-As-You-Go | Usage Details API | Exports API | ✅ Yes |
Visual Studio | Usage Details API | Exports API | ✅ Yes |
Enterprise Agreement (EA) | Usage Details API | Cost Details API | ✅ Yes |
Microsoft Customer Agreement (MCA) | Usage Details API | Cost Details API | ✅ Yes |
PAYG customers will eventually get Cost Details support, but Exports is officially the supported option right now.
What This Means for FinOps and Cloud Teams
If your FinOps or engineering teams pull cost data into automation pipelines, this change directly affects how those processes work.
Instead of making an API call that returns JSON, you now schedule recurring exports that drop CSVs into Blob Storage. Your processes read from storage, not from the API.
This small change makes a big difference in reliability. It eliminates throttling, improves schema consistency, and makes cost ingestion predictable.
For FinOps teams, this means:
Fewer failed API jobs
A consistent schema that works across subscriptions
Easier integration with Power BI and Azure Data Factory
Simpler cost allocation and tagging consistency
TL;DR: The Path Forward
Find your old scripts. Look for anything calling Microsoft.Commerce/UsageAggregates.
Migrate to Exports (for PAYG) or Cost Details (for EA and MCA).
Change your data flow to pull from Blob Storage instead of calling APIs directly.
Review field mappings. The new APIs use updated column names. Check Microsoft’s field mapping reference. Note the same link is listed up above in case you didn't click earlier.
Test your new pipeline. Validate that costs align before the legacy endpoint retires.
This transition is not just a technical change. It is an opportunity to clean up how you manage billing data and bring consistency to your FinOps processes.
What’s Next
In my next post, we will go hands-on. Usually that's a crowd favorite.
We will walk through exactly what needs to change in PowerShell and Python scripts, highlight the specific lines that need updates, and provide enterprise-ready examples you can drop directly into your repository of choice (mine is usually GitHub).
Stay tuned. This is where the modernization turns into real FinOps automation.
