如何获取Event Hub Azure的Bearer令牌
我已经在Microsoft Azure中创建了事件中心,我正在尝试执行GET操作来获取有关以下文档的事件中心的详细信息:- https://docs.microsoft.com/zh-cn/rest/api/eventhub/eventhubs/get ,但我需要"Bearer Token"在POSTMAN中获取结果,如何获取令牌?详细的解释将不胜感激
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
Please follow the doc to create Azure Active Directory application to get the clientId
,secret
and tenantId
.
然后将事件中心资源的权限授予您的AD应用.
Then grant permission of event hub resource to your AD app.
然后按以下方式获取访问令牌
Then get access token as follows
然后使用它执行GET操作以获取详细信息.
Then use it to perform a GET operation to get details.
希望它对您有帮助.