Microsoft Graph API:unsupported_response_type

Microsoft Graph API : unsupported_response_type

我尝试按照以下指南在 Microsoft Graph API 上对应用程序进行身份验证:https://azure.microsoft.com/en-gb/documentation/articles/active-directory-v2-protocols-oauth-client-creds/

当我向目录管理员请求权限时,出现此错误:

error=unsupported_response_type error_description=AADSTS70005: The token request contains one or more unsupported response token type(s): 'UnknownTokenType'

我用了几个URL和URL的例子,错误都是一样的:https://login.microsoftonline.com/common/adminconsent?client_id=6731de76-14a6-49ae-97bc-6eba6914391e&state=12345&redirect_uri=http://localhost/myapp/permissions

我的请求有什么问题?

这对我也不起作用。找到替代方案 url 以提供管理员许可。

https://login.microsoftonline.com/common/oauth2/authorize?client_id=xxxxx&prompt=admin_consent&state=12345&redirect_uri=https://localhost/myapp/permissions&response_type=code+id_token&nonce=AnyValueShouldBeRandom

这是标准的 OAuth 同意登录,但添加了提示=admin_consent。