【问题标题】:Is there any REST API or call to Azure which I can use to verify if my subscription id, client id, client secret and tenant id are valid?是否有任何 REST API 或对 Azure 的调用可用于验证我的订阅 ID、客户端 ID、客户端密码和租户 ID 是否有效?
【发布时间】:2020-07-16 09:16:02
【问题描述】:

我有一个问题,用户可以添加他们的 azure 客户端 ID、客户端密码、租户 ID 和订阅 ID,如果给定条目,我们必须使用某种方式验证用户正确与否。

有什么方法可以验证 Azure 中的客户端 ID、客户端密码、租户 ID、订阅 ID 的详细信息是否正确?

【问题讨论】:

    标签: azure azure-active-directory rest azure-authentication service-principal


    【解决方案1】:

    没有关于验证身份的官方文档。

    您可以尝试通过 Postman 请求 Token,请参阅here。如果你能得到成功的响应,则 ids 是有效的。

    POST https://login.microsoftonline.com/{tenant}/oauth2/v2.0/token
    Content-Type: application/x-www-form-urlencoded
    
    client_id=535fb089-9ff3-47b6-9bfb-4f1264799865
    &scope=https%3A%2F%2Fgraph.microsoft.com%2F.default
    &client_secret=qWgdYAmab0YSkuL1qKv5bPX
    &grant_type=client_credentials
    

    【讨论】:

      猜你喜欢
      • 2018-01-21
      • 2020-11-08
      • 1970-01-01
      • 2019-09-24
      • 1970-01-01
      • 1970-01-01
      • 2018-04-25
      • 1970-01-01
      • 2017-11-28
      相关资源
      最近更新 更多