How to fetch management group cost by using Azure cost management API?

Aayushi Solanki 41 Reputation points
2022-05-18T10:50:27.057+00:00

Instead of fetching subscription data, I want to fetch the data at management group, what would be the endpoint for it, also parameter.
And also for this any oauth profile is required or not?

Azure Cost Management
Azure Cost Management
A Microsoft offering that enables tracking of cloud usage and expenditures for Azure and other cloud providers.
3,577 questions
{count} votes

Accepted answer
  1. SadiqhAhmed-MSFT 49,326 Reputation points Microsoft Employee Moderator
    2022-05-19T19:18:47.843+00:00

    @Aayushi Solanki Query API supports management groups as a scope as well. However, we do not support management groups that contain MCA subscriptions.

    Refer to the documentation below:

    Management group scope parameters are documented here - https://learn.microsoft.com/en-us/rest/api/cost-management/query/usage#uri-parameters

    Management group query sample request - https://learn.microsoft.com/en-us/rest/api/cost-management/query/usage#managementgroupquery-legacy

    Hope this helps!

    ----------------------------------------------------------------------------------------------------------------------

    If the response helped, do "Accept Answer" and up-vote it

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

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.