如何获取Event Hub Azure的Bearer令牌 [英] How to get Bearer token for Event Hub Azure

查看:56
本文介绍了如何获取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.

希望它对您有帮助.

这篇关于如何获取Event Hub Azure的Bearer令牌的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆