Regarding access token generation using REST API

Test Admin 176 Reputation points
2024-04-22T12:54:39.3233333+00:00

We are using Azure subscription with the Standard Tier.

We have a requirement to use Cost Details API in our application. For that, we need to generate access token for Cost Details API authorization. Is there any REST API available to generate access token?

Azure Cost Management
Azure Cost Management
A Microsoft offering that enables tracking of cloud usage and expenditures for Azure and other cloud providers.
Windows for business | Windows Client for IT Pros | Directory services | Active Directory
0 comments No comments
{count} votes

Answer accepted by question author
  1. SadiqhAhmed-MSFT 49,446 Reputation points Microsoft Employee Moderator
    2024-04-23T13:42:08.0633333+00:00

    Hello @Test Admin Thank you for contacting us on Microsoft Q&A platform. Happy to answer any questions you may have!

    Regarding access token generation using REST API; the Generate cost detail report API uses AD auth token from the audience https://management.azure.comthis is same for calling any ARM APIs. It is not specific to Cost Management APIs. 

    This doc https://learn.microsoft.com/en-us/rest/api/servicebus/get-azure-active-directory-token#use-postman-to-get-the-azure-ad-token has example of how to generate auth token for Azure AD.

    Hope this helps. Feel free to reply if you have any questions!


    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' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.