Any alternate Azure Subscription REST API's here

Vaibhav Reddy 6 Reputation points
2022-11-03T19:19:49.72+00:00

Hi
I’m looking to get billing scope with a given subscription_id is there any API.I have found this API : GET https://management.azure.com/providers/Microsoft.Subscription/aliases/{aliasName}?api-version=2021-10-01
but this is not returning the billing scope as mentioned in documentation.Getting this response using the above API:
256884-image.png

And is there any API which I can use to list all the subscription_ids and its associated management group_ids in response. This list subscription API: GET https://management.azure.com/subscriptions?api-version=2020-01-01
is only returning tenant id information and not management_group_id. Can you 
please suggest if there are any alternative API’s I can use here. Thank you.

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

1 answer

Sort by: Most helpful
  1. JananiRamesh-MSFT 22,716 Reputation points
    2022-11-06T09:16:31.46+00:00

    Hi @Vaibhav Reddy Thanks for reaching out. Please refer this doc https://learn.microsoft.com/en-us/rest/api/billing/ to use the rest api calls related to billing and to fetch the all the subscriptions and its associated management ids use this rest api call https://learn.microsoft.com/en-us/rest/api/managementgroups/entities/list?tabs=HTTP

    Let me know incase of further queries, I would be happy to assist you.

    Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.

    0 comments No comments