Regarding access token generation using REST API

Test Admin 171 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.
2,047 questions
Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
5,897 questions
0 comments No comments
{count} votes

Accepted answer
  1. SadiqhAhmed-MSFT 37,921 Reputation points Microsoft Employee
    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