简体   繁体   中英

Azure Forecast Rest Api Returning Error code 404: “Cost management data is not supported for subscription”

I'm trying to use the azure forecast rest API of version "2019-10-01".And the Version which I'm using is the latest version.

GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Consumption/forecasts?$filter={$filter}&api-version=2019-10-01

I am able to get the forecast details for other subscription but unable to get the response for a specific subscription id cxxxxx-xxxx-xxx-xxxxxxxxxxxx8.Please someone help to resolve this issue.

Error message:: {'error': {'code': '404', 'message': 'Cost management data is not supported for subscription(s) cxxxxx-xxxx-xxx-xxxxxxxxxxxx8 in the provided api-version. Please use api-version 2019-10-01 or later. (Request ID: 0cd6dd95-642d-4de0-9f31-5b2897ef2c61)'}}

I would go and check the subscription type for which it is not working.

You're most likely to encounter this issue if the subscription type is of one of the below :

MS-AZR-0145P (CSP)
MS-AZR-0146P (CSP)
MS-AZR-159P (CSP)
MS-AZR-0036P (sponsored)
MS-AZR-0143P (sponsored)
MS-AZR-0015P (internal)
MS-AZR-0144P (DreamSpark)

The above offer id/subscription types are not supported by API.

To check from the portal,

Access portal.azure.com --> Subscriptions

在此处输入图片说明

Find the subscription that is not working and click the same. You could the offer ID in the resulting page under the Essentials.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM