azure - oAuth2-AADSTS90009 : Issue in connecting Azure Active Directory

标签 azure azure-active-directory

我在连接到 Azure Active Directory 时遇到以下错误

“AADSTS90009:应用程序“xxxxxxxxxxxxxxxxx”正在为其自身请求 token 。仅当使用基于 GUID 的应用程序标识符指定资源时才支持此场景。

最佳答案

如果您想使用Web应用程序调用Web API,请引用sample 。详细步骤。

  1. 在 Azure 门户中注册您的 Web API 应用程序。更多详情请引用document .
  2. 在 Azure 门户中注册您的 Web 应用程序
  3. 授予权限。(将您的 Web API 应用程序添加到您的 Web 应用程序中)

    a.选择您的网络应用程序
    b.设置权限。 enter image description here enter image description here enter image description here enter image description here

  4. 获取访问 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/

相关文章:

azure - 通过 Azure API 管理网关从 AAD 获取 JWT-Token

javascript - 将 MSAL.js 用于 NodeJ

url - Azure 网站。如何删除默认链接?

azure - 如何向容器添加过滤器以删除虚拟文件夹中除某些 Blob 之外的 Blob?

azure-web-app-service - 如何在 Web 应用程序中从 Azure AD 刷新 ID token ?

azure - 使用 Azure AD 对本地 Sharepoint 2013 进行身份验证

azure - 具有角度的 MSAL 无法进行身份验证 - 尝试发现实例时失败

c# - 按钮在 Html 表格中不可见?

azure - 保护消费计划中 APIM(Azure API 管理)中的后端 API

azure - 在 azure 函数上部署现有的 python FastAPI 项目