AADSTS900144:请求正文必须包含以下参数:'scope' 使用旧版开发人员门户时

AADSTS900144: The request body must contain the following parameter: 'scope' when using legacy Developer Portal

我试图在基于 this article and this article 的 APIM 实例中实施 AAD。不幸的是,当它归结为开发人员控制台时,在我选择授权代码作为授权方法之后,弹出窗口出现并向我显示以下错误:

AADSTS900144: The request body must contain the following parameter: 'scope'.

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 门户(此时是遗留开发人员门户)的一部分,因此我没有填写范围参数。您如何设置 属性?或者是其他地方的问题?

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

您可以从您的 webapi application 中找到范围。