我在连接到 Azure Active Directory 时遇到以下错误
“AADSTS90009:应用程序“xxxxxxxxxxxxxxxxx”正在为其自身请求 token 。仅当使用基于 GUID 的应用程序标识符指定资源时才支持此场景。
最佳答案
如果您想使用Web应用程序调用Web API,请引用sample 。详细步骤。
- 在 Azure 门户中注册您的 Web API 应用程序。更多详情请引用document .
- 在 Azure 门户中注册您的 Web 应用程序
授予权限。(将您的 Web API 应用程序添加到您的 Web 应用程序中)
获取访问 token
方法:POST
网址:https://login.microsoftonline.com/ [目录ID]/oauth2/token
标题
缓存控制:无缓存 内容类型:application/x-www-form-urlencoded
正文
grant_type:密码 资源:您的应用程序 ID URI client_id : [应用程序 ID] client_secret : [键值] 用户名:[帐户名] 密码:[密码]
关于azure - oAuth2-AADSTS90009 : Issue in connecting Azure Active Directory,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52923372/