Udesh Sendanayake
Udesh Sendanayake

Reputation: 107

"Cost management data is unavailable for subscription" AZURE cost usage API

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

https://learn.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.

Upvotes: 1

Views: 7110

Answers (1)

Gaurav Mantri
Gaurav Mantri

Reputation: 136126

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://learn.microsoft.com/en-us/azure/cost-management-billing/costs/understand-cost-mgt-data#supported-microsoft-azure-offers.

Upvotes: 3

Related Questions