gpt4 book ai didi

azure-active-directory - Azure AD 应用注册 : "AADSTS90094: The grant requires admin permission" error for permission that has "REQUIRES ADMIN" set to "No"

转载 作者:行者123 更新时间:2023-12-04 14:39:11 25 4
gpt4 key购买 nike

我正在 Azure AD 门户中设置一个应用注册,以便与我的示例 ASP.Net Core 2 Web 应用一起使用。首先,我想让基本的身份验证工作。我正在将此应用程序配置为仅启用一项权限“登录并读取用户个人资料”,请注意,它不需要管理员权限:

AD App Registration, Enable Access blade

但是,当我运行 Web 应用程序并尝试针对此客户端 ID 进行身份验证时,出现“AADSTS90094:授权需要管理员权限”错误:

You can't access this application

AspNetCoreAdAuth needs permission to access resources in your organization that only an admin can grant. Please ask an admin to grant permission to this app before you can use it.



这是我的应用程序用来进行身份验证的 URL(删除了一些敏感或不相关的数据):
https://login.microsoftonline.com/<my_tenant_id>/oauth2/authorize?client_id=<my_client_id>&redirect_uri=<my_redirect_uri>&response_type=id_token&scope=openid%20profile&response_mode=form_post&nonce=<gibberish>&state=<giberrish>&x-client-SKU=ID_NET&x-client-ver=2.1.4.0

SO 和其他地方的大多数解决方案都建议简单地使用“授予权限”按钮来解决此错误。然而
  • 作为开发人员,我没有管理员权限
  • 要求管理员为每个人授予此权限似乎是一种大锤方法
  • 我想了解为什么会发生这种情况,或者我做错了什么导致它无法正常工作

  • 有任何想法吗?

    最佳答案

    一种可能的原因是您的组织管理员已禁用 用户可以同意应用代表他们访问公司数据 环境。

    您可以在用户设置下找到它:

    User settings

    关于azure-active-directory - Azure AD 应用注册 : "AADSTS90094: The grant requires admin permission" error for permission that has "REQUIRES ADMIN" set to "No",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48124379/

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