gpt4 book ai didi

azure - 获取 #error=unsupported_response_type&error_description=AADSTS70005 : with token request

转载 作者:行者123 更新时间:2023-12-03 01:10:46 28 4
gpt4 key购买 nike

我正在尝试在 IOS 应用程序中实现 OAuth2 隐式授权流程。在这种情况下,它需要 token 请求而不是代码请求,因为您无法在 native 应用程序中安全地共享客户端 key 。

这样的请求会生成一个登录表单:

https://login.windows.net/<tenantid>/oauth2/authorize?api-version=1.0&client_id=<client id>&response_type=token&redirect_uri=shp-apps://localhost:44300/?ReturnUrl=%2F&resource=https://graph.windows.net

成功登录后出现此错误:

#error=unsupported_response_type&error_description=AADSTS70005: response_type 'token' 
is not supported for the application
Trace+ID: 9008e580-2798-4b6c-a6bf-2bf614b61f64
Correlation+ID: ceb9bb4b-34a4-4441-801f-377f534543b1
Timestamp: 2014-08-26+16%3a24%3a24Z

这实际上是正确的吗? token request_type 不受支持?或者还有什么我需要做的吗?该应用程序被设置为 native 应用程序。我已经能够在同一事件目录中的不同应用程序中执行“代码”response_type。

最佳答案

根据 MSDN 文档 AAD Auth Failures - Implicit OAuth is not enabled for the application ,您需要在 Azure 门户的应用程序注册 list 中将 oauth2AllowImplicitFlow 设置为 true

问题

在 AAD 中创建应用注册时,您需要手动编辑应用程序 list 并将 oauth2AllowImplicitFlow 属性的值设置为 true。否则 AAD 登录流程将无法工作

error "AADSTS70005: response_type 'token' is not supported for the application..."

解决方案

请按照以下步骤解决此问题。

  1. 使用租户中的管理员帐户登录 portal.azure.com

  2. 导航到左侧栏中的 Azure Active Directory> 应用注册> 您的应用

  3. 点击描述您的应用的 Pane 顶部的 list

  4. 将属性 oauth2AllowImplicitFlow 的值更改为 true。如果该属性不存在,请添加它并将其值设置为 true

    enter image description here

  5. 点击“保存”保存修改后的 list 。

关于azure - 获取 #error=unsupported_response_type&error_description=AADSTS70005 : with token request,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25511096/

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