Charge back Azure Reservation costs
Enterprise Agreement and Microsoft Customer Agreement billing readers can view amortized cost data for reservations. They can use the cost data to charge back the monetary value for a subscription, resource group, resource, or a tag to their partners. In amortized data, the effective price is the prorated hourly reservation cost. The cost is the total cost of reservation usage by the resource on that day.
Users with an individual subscription can get the amortized cost data from their usage file. When a resource gets a reservation discount, the AdditionalInfo section in the usage file contains the reservation details. For more information, see View and download your Azure usage and charges.
See reservation usage data for show back and charge back
- Sign in to the Azure portal.
- Navigate to Cost Management + Billing.
- Select Cost analysis from left navigation.
- Under Actual Cost, select the Amortized Cost metric.
- To see which resources were used by a reservation, apply a filter for Reservation and then select reservations.
- Set the Granularity to Monthly or Daily.
- Set the chart type to Table.
- Set the Group by option to Resource.
Get the data for show back and charge back
- Sign in to the Azure portal.
- Navigate to Cost Management + Billing.
- Select Export from left navigation.
- Select Add.
- Select Amortized cost as the metric button and setup your export.
The EffectivePrice for the usage that gets reservation discount is the prorated cost of the reservation (instead of being zero). This helps you know the monetary value of reservation consumption by a subscription, resource group or a resource, and can help you charge back for the reservation utilization internally. The dataset also has unused reservation hours.
Get Azure consumption and reservation usage data using API
You can get the data using the API or download it from Azure portal.
You call the Usage Details API to get the new data. For details about terminology, see usage terms.
Here's an example call to the Usage Details API:
https://management.chinacloudapi.cn/providers/Microsoft.Billing/billingAccounts/{enrollmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodId}/providers/Microsoft.Consumption/usagedetails?metric={metric}&api-version=2019-05-01&$filter={filter}
For more information about {enrollmentId} and {billingPeriodId}, see the Usage Details – List API article.
Information in the following table about metric and filter can help solve for common reservation problems.
Type of API data | API call action |
---|---|
All Charges (usage and purchases) | Replace {metric} with ActualCost |
Usage that got reservation discount | Replace {metric} with ActualCost Replace {filter} with: properties/reservationId%20ne%20 |
Usage that didn't get reservation discount | Replace {metric} with ActualCost Replace {filter} with: properties/reservationId%20eq%20 |
Amortized charges (usage and purchases) | Replace {metric} with AmortizedCost |
Unused reservation report | Replace {metric} with AmortizedCost Replace {filter} with: properties/ChargeType%20eq%20'UnusedReservation' |
Reservation purchases | Replace {metric} with ActualCost Replace {filter} with: properties/ChargeType%20eq%20'Purchase' |
Refunds | Replace {metric} with ActualCost Replace {filter} with: properties/ChargeType%20eq%20'Refund' |
Download the usage CSV file with new data
If you're an EA admin, you can download the CSV file that contains new usage data from Azure portal.
In the Azure portal, navigate to Cost management + billing.
- Select the billing account.
- Select Usage + charges.
- Select Download.
- In Usage Details, select Amortized usage data.
The CSV files that you download contain actual costs and amortized costs.
Need help? Contact us.
If you have questions or need help, create a support request.
Next steps
- To learn more about Azure Reservations usage data, see the following articles: