Proper way to retrieve Offer Type of Subscriptions via REST API

Raymond Sarmiento 1 Reputation point

I am trying to retrieve the offer type of azure subscriptions via REST API. Currently, I am having problem identifying a Microsoft Customer Agreement type from an Enterprise Agreement type. I needed to add an extra cost management-related role to a user when the type is of Microsoft Customer Agreement.

The existing endpoint for subscriptions using Azure Resource Management API has no property relating to its offer type aside from subscriptionPolicies.quotaId which is the same for both. Doing it via Azure Resource Graph API yields the same result.

Is there a way I can identify each of the subscriptions' offer type? Preferably via REST.

Azure Cost Management
Azure Cost Management
A Microsoft offering that enables tracking of cloud usage and expenditures for Azure and other cloud providers.
1,853 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Monalla-MSFT 9,836 Reputation points

    Hello @Raymond Sarmiento - Welcome to Microsoft Q&A and thanks for reaching out to us.

    Apologies for the delay in responding back to you.

    There is a way to get offer Type using Azure REST API.

    Endpoint: GET{scope}/providers/Microsoft.Consumption/usageDetails?api-version=2019-10-01

    You can run\try by hitting below url:

    You need to login with your Azure user id and password to try\test it.


    You will get response as shown below with offer id:


    For more detail, please refer Usage Details - List API:

    Hope this helps. and please feel free to reach out if you have any further questions.


    If the above response was helpful, please feel free to "Accept as Answer" and "Upvote" the same so it can be beneficial to the community.

    0 comments No comments