An Azure service that provides a hybrid, multi-cloud management platform for APIs.
For a Microsoft Customer Agreement (MCA) billing account, MACC tracking via the Consumption APIs behaves as follows based on the documented behavior.
- Events API and MACC history
For MACC, the documented Events API call is:
GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/<billingAccountName>/providers/Microsoft.Consumption/events?api-version=2021-05-01&startDate=<startDate>&endDate=<endDate>&$filter=lotsource%20eq%20%27ConsumptionCommitment%27
Key points from the documentation:
- The Events API "returns all events that affected your MACC" for the given date range.
- Events are described as invoiced spending that decremented the MACC, with fields such as
transactionDate,charges,closedBalance, andinvoiceNumber. - Only
SettledChargesevents are supported for MACC.
Therefore:
- The Events API is intended to return all MACC-related settlement events within the specified
startDate/endDatewindow, not just the latest event. - If only one event is returned, it is typically because only one
SettledChargesevent exists in the specified date range, or because the date range/filter effectively narrows the result to that single event.
- Required filters / parameters for historical MACC events
The MACC documentation shows the minimum required parameters:
-
startDate(required) -
endDate(required) -
$filter=lotsource eq 'ConsumptionCommitment'(to restrict to MACC events)
Example:
GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/<billingAccountName>/providers/Microsoft.Consumption/events?api-version=2021-05-01&startDate=2024-01-01&endDate=2024-12-31&$filter=lotsource%20eq%20%27ConsumptionCommitment%27
The documentation does not list any additional required filters (such as lotId) to retrieve historical MACC events. Filtering by lotSource is sufficient to get all MACC events for the billing account in the specified date range.
- Balances API support for MCA billing accounts
For MCA, the documented pattern for tracking credit/MACC-like balances is:
- Use
Microsoft.Consumption/lotsto retrieve credit or commitment lots and theirclosedBalance. - Use
Microsoft.Consumption/eventsto retrieve transactions that affect those lots.
For MCA credit balance (not MACC), the documented REST pattern is:
GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/<billingAccountId>/billingProfiles/<billingProfileId>/providers/Microsoft.Consumption/lots?api-version=2023-03-01
and events via:
GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/<billingAccountID>/billingProfiles/<billingProfileID>/providers/Microsoft.Consumption/events?api-version=2023-03-01&startDate=<date>&endDate=<date>
The documentation for MCA focuses on lots and events and does not describe a Microsoft.Consumption/balances endpoint for MCA billing accounts. Instead, it explicitly states that the available balance is computed by aggregating closedBalance across active credits.
Given this, the supported pattern for MCA is:
- Use
lots+eventsto derive balances. - A dedicated
balancesendpoint is not documented for MCA.
- Known limitations for
Microsoft.Consumption/eventsandMicrosoft.Consumption/balanceswith MCA
From the documented MCA behavior:
- Events:
- Only
SettledChargesevents are supported for MACC. - Events are tied to invoiced spending; if there are few invoices or limited MACC-eligible spend, the number of events will be correspondingly small.
- Events require
startDateandendDateand can be filtered bylotSource = 'ConsumptionCommitment'.
- Only
- Balances:
- For MCA, balance information is exposed via
lots(closedBalancefields) andevents, not via a separatebalancesresource. - A 404 from a
balancesendpoint for an MCA billing account is consistent with the absence of documented support forMicrosoft.Consumption/balancesfor MCA.
- For MCA, balance information is exposed via
In practice for MCA MACC:
- Use the Lots API (
Microsoft.Consumption/lots) to get MACC commitment metadata and remaining balance (closedBalance). - Use the Events API (
Microsoft.Consumption/eventswithlotSource eq 'ConsumptionCommitment'and a suitable date range) to retrieve all MACC settlement events. - Do not rely on
Microsoft.Consumption/balancesfor MCA; instead, compute balances fromlotsandevents.
References: