0
votes

I'm trying to retrieve Azure cost data for the management group using azure cost usage API.

https://docs.microsoft.com/en-us/rest/api/cost-management/query/usage

But Im getting below error.

"Cost management data is unavailable for subscription xxxxxxxxxxx. The offer MS-AZR-xxxxP is not supported. (Request ID: xxxxx-xxxxx-xxx-xxx-xxxxx)"

Request URL https://management.azure.com/providers/Microsoft.Management/managementGroups/xxxxxxxxxx/providers/Microsoft.CostManagement/query?api-version=2019-11-01&$top=5000

Is there any way to skip such subsciptions and get data for supported subscriptions using above API.Please assist.

1

1 Answers

2
votes

Reason you may be seeing this message is because Azure Cost Management is not supported for all Azure Offer types.

Please check this link for supported/unsupported Azure Offer types for Azure Cost Management: https://docs.microsoft.com/en-us/azure/cost-management-billing/costs/understand-cost-mgt-data#supported-microsoft-azure-offers.