AADSTS900144:请求正文必须包含以下参数:使用旧版开发人员门户时的“范围”

Mau*_*mek 8 azure azure-active-directory azure-api-management

我试图根据这篇文章这篇文章在我的 APIM 实例中实现 AAD 。不幸的是,当它进入开发人员控制台时,在我选择授权代码作为授权方法后,立即出现一个弹出窗口,并向我显示以下错误:

AADSTS900144: The request body must contain the following parameter: 'scope'.
Run Code Online (Sandbox Code Playgroud)

它失败了https://login.microsoftonline.com/{Directory (tenant) ID }/oauth2/v2.0/authorize?response_type=code&client_id={client id}&redirect_uri=https://{my-apim-instance}/docs/services/{authorization method}/console/oauth2/authorizationcode/callback&state={state}

由于所有这些都是 Azure 门户(此时为旧版开发人员门户)的一部分,因此我不填写范围参数。你如何设置该属性?或者问题出在其他地方?

Ton*_* Ju 7

由于您使用的是V2端点,因此您需要在默认范围字段中使用为后端应用程序创建的范围。

在此输入图像描述

您可以从您的webapi 应用程序中找到范围。

在此输入图像描述