【问题标题】:404 Not Found error via resource owner password credentials flow in Azure AD B2C通过 Azure AD B2C 中的资源所有者密码凭据流出现 404 Not Found 错误
【发布时间】:2019-02-02 19:06:56
【问题描述】:

按照以下示例后,我收到以下错误: 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,具有全局管理员角色以遵循示例,但出现上述错误。

以下是示例中的代码:

下面的这个链接返回结果表单网页浏览器:

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

有什么想法吗?

【问题讨论】:

    标签: azure azure-active-directory azure-ad-b2c


    【解决方案1】:

    您必须确保在令牌请求中包含p= 查询参数:

    https://mytenant.b2clogin.com/mytenant.onmicrosoft.com/oauth2/v2.0/token?p=B2C_1_ROPC_Auth

    【讨论】:

      猜你喜欢
      • 2022-11-04
      • 2015-05-20
      • 2019-02-19
      • 1970-01-01
      • 2017-12-13
      • 1970-01-01
      • 1970-01-01
      • 2013-11-23
      • 1970-01-01
      相关资源
      最近更新 更多