AADB2C90083:请求缺少必需参数:grant_type

Kou*_*dal 5 azure azure-active-directory azure-ad-b2c

我正在尝试使用以下 URL 中提到的自定义策略在 Azure Active Directory B2C 中配置 ROPC 流。

https://docs.microsoft.com/en-us/azure/active-directory-b2c/ropc-custom

但是在测试 ROPC 策略时出现以下错误。{ "error": "invalid_request", "error_description": "AADB2C90083: 请求缺少必需参数:grant_type。\r\n相关 ID:b4153dfe-4296-4b68-850f-ee30ac4d86b0\r\n时间戳:2019- 11:53:23Z\r\n" }

小智 2

https://<your-tenant-name>.b2clogin.com/<your-tenant-name>.onmicrosoft.com/oauth2/v2.0/token?p=B2C_1A_<POLICY_NAME>&username=xxxxx&password=xxxxx&grant_type=password&scope=openid <NativeClient_App_ID> offline_access&client_id=<NativeClient_App_ID>&response_type=token id_token
Run Code Online (Sandbox Code Playgroud)

在上面的 URL 中添加您的租户名称、ROPC 登录策略名称、用户名和密码以及您的本机客户端 ID。

现在尝试发送请求并检查。