How to get Bearer token for Event Hub Azure

2019-09-02 16:16发布

问题:

I have created an Event Hub in Microsoft Azure, I am trying to perform a GET operation to get details of my Event Hub following the docs : - https://docs.microsoft.com/en-us/rest/api/eventhub/eventhubs/get, but I need "Bearer Token" to get the result in POSTMAN, how to get the token? Detail explanation would be appreciated

回答1:

Please follow the doc to create Azure Active Directory application to get the clientId,secret and tenantId.

Then grant permission of event hub resource to your AD app.

Then get access token as follows

Then use it to perform a GET operation to get details.

Hope it helps you.