Use billing REST API with Azure Sponsorship Subscription

julien senechal 26 Reputation points
2022-02-18T09:08:06.343+00:00

Hello,

We currently have an Azure Sponsoship subscription with test credits, and I would like to know if it is still possible to retrieve the billing information through the REST API.

We don't have a billing account or a profile account, so there is no way to fill in the information needed by the API.

Thanks in advance for your help

Microsoft Partner Center API
Microsoft Partner Center API
Microsoft Partner Center: A Microsoft website for partners that provides access to product support, a partner community, and other partner services.API: A software intermediary that allows two applications to interact with each other.
336 questions
0 comments No comments
{count} votes

Accepted answer
  1. Alan Kinane 16,901 Reputation points MVP
    2022-02-18T10:37:05.843+00:00

    Hi, no the sponsorship agreements do not make use of the billing provider API as confirmed here: https://learn.microsoft.com/en-us/rest/api/consumption/

    I did come across a post here: https://stackoverflow.com/questions/53844639/how-do-you-query-usage-details-in-azure-for-csp-sponsored-subscriptions

    ..which mentions it may be possible using a different API but I have not tried this myself.

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. julien senechal 26 Reputation points
    2022-02-18T09:52:15.03+00:00

    Failure responding to request: StatusCode=422 -- Original Error: autorest/azure: Service returned an error. Status=422 Code="422" Message="Cost Management supports only Enterprise Agreement, Web direct and Microsoft Customer Agreement offer types. Subscription XXXXXXXXXXXXX is not associated with a valid offer type.Cost Management supports only Enterprise Agreement, Web direct and Microsoft Customer Agreement offer types. Subscription XXXXXXXXXXXXXXXXXXX is not associated with a valid offer type.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.