AADSTS70007:请求令牌时,"query"不是受支持的"response_mode"值 [英] AADSTS70007: 'query' is not a supported value of 'response_mode' when requesting a token

查看:64
本文介绍了AADSTS70007:请求令牌时,"query"不是受支持的"response_mode"值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,几天前我在Azure AD中创建了一个应用程序.当请求授权码时,当我同时要求 code id_token (在 response_type 参数中)时,出现以下错误:

So I created an application in Azure AD a few days ago. When requesting authorization code, I am getting the following error back when I ask for both code and id_token (in response_type parameter):

AADSTS70007:当以下情况时,"query"不是受支持的"response_mode"值请求令牌

AADSTS70007: 'query' is not a supported value of 'response_mode' when requesting a token

跟踪ID:xxxx-xxxx-xxxx-xxxx-xxxx

Trace ID: xxxx-xxxx-xxxx-xxxx-xxxx

关联ID:xxxx-xxxx-xxxx-xxxx-xxxx

Correlation ID: xxxx-xxxx-xxxx-xxxx-xxxx

时间戳:2018-06-13 16:06:03Z

Timestamp: 2018-06-13 16:06:03Z

我的请求网址如下所示:

My request URL looks something like this:

https://login.microsoftonline.com/common/oauth2/authorize?resource=https%3A%2F%2Fmanagement.core.windows.net%2F&client_id=application-client-id&response_type=code + id_token& redirect_uri = urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob& response_mode = query& nonce = 1528906255418& state = 12345

但是,如果我只要求输入 code 而不是 id_token ,则不会出现任何错误.因此,从本质上讲,以下URL可以正常工作:

However, I don't get any errors if I only ask for code and not id_token. So essentially, following URL works:

https://login.microsoftonline.com/common/oauth2/authorize?resource=https%3A%2F%2Fmanagement.core.windows.net%2F&client_id=application-client-id&response_type=code& redirect_uri = urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob& response_mode = query& nonce = 1528906255418& state = 12345

更有趣的是,如果我使用几个月前创建的应用程序的客户端ID,则代码可以正常工作,Azure AD会同时向我返回 code id_token .

What is even more interesting is that if I use a client id of an application created a few months ago, the code works perfectly fine and Azure AD returns me both code and id_token.

我确实在这里发现了一个类似的问题:

I did find one similar problem here: https://sharepoint.stackexchange.com/questions/242669/aadsts70007-query-is-not-a-supported-value-of-response-mode-when-requesting but there was no answer provided for that question.

我很好奇:

  • 为什么Azure AD对于较旧的应用程序不会引发任何错误,而对于较新的应用程序却不会引发任何错误?最近在Azure AD级别上进行了任何更改会导致此问题吗?而且,仅对于较新的应用程序也是如此.
  • 是否有防止这种错误发生的方法?我非常想使用 query 作为 response_mode 而不是 form_post .
  • Why Azure AD does not throw any error for older application but for newer application? Has anything changed at the Azure AD level recently that will cause this problem? And that too for only newer applications.
  • Is there a way to prevent this error from happening? I would very much like to use query as response_mode instead of form_post.

推荐答案

两个不同的授权流:

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆