azure - 通过 Azure AD B2C 中的资源所有者密码凭据流出现 404 Not Found 错误
问题描述
遵循以下示例后出现以下错误: https ://docs.microsoft.com/en-gb/azure/active-directory-b2c/configure-ropc
HTTP/1.1 404 Not Found
Cache-Control: private
Content-Type: text/html
Server: Microsoft-IIS/10.0
X-Frame-Options: DENY
Strict-Transport-Security: max-age=31536000; includeSubDomains
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
404 - File or directory not found.
The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.
我使用具有全局管理员角色的 Outlook 帐户,例如 myname@outlook.com 来遵循示例,但出现上述错误。
以下是示例中的代码:
以下链接返回结果表单 Web 浏览器:
https://mytenant.b2clogin.com/mytenant.onmicrosoft.com/v2.0/.well-known/openid-configuration?p=B2C_1_ROPC_Auth
通过 Fiddler 测试用户流
https://mytenant.b2clogin.com/mytenant.onmicrosoft.com/oauth2/v2.0/token?B2C_1_ROPC_Auth
Content-Type: application/x-www-form-urlencoded
username=myname@outlook.com&password=mypassword&grant_type=password&scope=openid myappId offline_access&client_id=myappId&response_type=token+id_token
任何想法?
解决方案
您必须确保p=
在令牌请求中包含查询参数:
https://mytenant.b2clogin.com/mytenant.onmicrosoft.com/oauth2/v2.0/token?p=B2C_1_ROPC_Auth
推荐阅读
- openlayers - 开放层。矢量瓷砖,边缘的样式特征
- dragonruby-game-toolkit - 如何在 DragonRuby Game Toolkit 中的“sprite”上渲染“solid”?
- go - 如何更正“if”构造中的类型比较
- vim - Vim 视觉模式在 cygwin 中表现异常
- python - Passing a scrapy HtmlResponse object to an external function
- asp.net - 没有“继承”属性就不能使用“代码文件”属性
- javascript - 如何获取对象属性 id 为“随机”的嵌套数组项并更改名称属性
- docker - 重启后的Docker容器:-无法连接到总线:没有这样的文件或目录
- apache-spark - 如何对 Pyspark 数据帧中的关键组执行 SCAN 操作
- python - 无法从“tensorflow.keras.applications”导入名称“imagenet_utils”