gpt4 book ai didi

azure - 如何使用用户名和密码验证 Microsoft Azure API

转载 作者:行者123 更新时间:2023-12-03 00:41:33 25 4
gpt4 key购买 nike

我想使用 Microsoft azure 用户名和密码获取访问 token 。是否有任何 API 或流程可以通过使用用户名和密码获得访问 token 。

最佳答案

根据您的评论,请按照详细步骤操作:

https://login.microsoftonline.com/YourTenant.onmicrosoft.com/oauth2/v2.0/token

client_id:b603c7be_Client_id_e61f925
scope:https://graph.microsoft.com/.default
client_secret:NpmwO/KDJ_client_secret:NpmwO_W0kWf1SbnL
username:tenentUser.onmicrosoft.com
password:YourUserPassword
grant_type:password

查看屏幕截图:

enter image description here

我按预期获得了 token

Step: 1

enter image description here

Step: 2

enter image description here

Step: 3

enter image description here

Note:

  1. Requested token user must be a tenant user for example <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="520b3d272007213720120b3d272026373c333c267c3d3c3f3b31203d213d34267c313d3f" rel="noreferrer noopener nofollow">[email protected]</a>
  2. User password must be correct that you are suing to token request.
  3. Make sure your user belong to azure portal on your tenant
  4. Your Client Id belongs to that tenant
  5. Application secret is valid or not expired.

更多信息您可以引用Official document

请随时分享您仍然遇到的问题。

关于azure - 如何使用用户名和密码验证 Microsoft Azure API,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60595441/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com