c# - Azure Apim 承载 token

标签 c# azure azure-active-directory

大家好,我正在关注 azure 的下一个教程: https://learn.microsoft.com/en-us/rest/api/apimanagement/current-ga/subscription/create-or-update?tabs=HTTP&tryIt=true&source=docs [Azure 创建或更新订阅]

我已经让它工作了,但我不知道示例使用的不记名 token 来自哪里

有人可以向我解释一下如何获得不记名 token 吗?实际上我计划使用它从后端创建 api key ,但我不完全知道从哪里可以请求不记名 token 。

我知道安全部分写着“Azure Active Directory OAuth2 Flow”,但有人可以向我解释它是如何工作的吗?

最佳答案

您可以通过以下命令获取不记名 token postman:

发布 https://login.microsoftonline.com/**{tenantid}**/oauth2/token

从您的应用程序中,您可以获取租户 ID 和客户端 ID Azure 门户 ->Azure Active Directory ->您的应用 -> 概述 enter image description here

客户端 key : enter image description here

enter image description here

当您发送命令时,您可以获得不记名 token 。

enter image description here

引用: Azure REST API: Create Bearer Token - cloudopszone.com

关于c# - Azure Apim 承载 token ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72988294/

相关文章:

c# - 通过Mysql数据库验证用户身份

Azure Powershell 命令无法在 Azure Blob 存储中存储 bacpac 文件

spring - Azure/AWS服务能否取代Spring Cloud和Netflix功能?

c# - 如何从 JWT 声明中识别登录是否来自 Microsoft(个人)帐户?

azure - 使用 https ://graph. microsoft.com 和 ActiveDirectoryClient 将用户添加到 Azure Active Directory

Azure - 如何将企业应用程序恢复为普通应用程序

c# - 获取鼠标的移动方向

c# - PropertyGrid:隐藏基类属性,如何?

c# - 通过lambda表达式引发异常时如何在asp.net web api中全局处理异常

azure - 更新 azure-sdk-for-go 库依赖项