azure - 使用 Azure AD B2C 中的自定义策略记录对身份提供程序的调用

标签 azure oauth-2.0 azure-ad-b2c openid-connect

我正在尝试使用自定义策略在 Azure AD B2C 中集成自定义 OpenID Connect 身份提供程序。 但是,使用授权代码从 IdP 重定向回后,自定义用户流会失败并出现以下错误(使用 MSAL.js):

login failure {"_error":"server_error","_errorDesc":"AADB2C90289: We encountered an error connecting to the identity provider. Please try again later.\r\nCorrelation ID: 97809cc4-04e8-47a3-9263-de57260e7979\r\nTimestamp: 2019-07-18 15:47:32Z\r\n","_scopes":""}

我已启用 Application Insights 日志记录,但我能找到的唯一相关内容是:

  {
""Kind"": ""HandlerResult"",
""Content"": {
  ""Result"": true,
  ""RecorderRecord"": {
    ""Values"": [
      {
        ""Key"": ""SendErrorTechnicalProfile"",
        ""Value"": ""OAuth2ProtocolProvider""
      },
      {
        ""Key"": ""Exception"",
        ""Value"": {
          ""Kind"": ""Handled"",
          ""HResult"": ""80131500"",
          ""Message"": ""We encountered an error connecting to the identity provider. Please try again later."",
          ""Data"": {
            ""IsPolicySpecificError"": false
          }
        }
      }
    ]
  },
  ""Statebag"": {
    ""SE"": {
      ""c"": ""2019-07-18T13:46:21.1438143Z"",
      ""k"": ""SE"",
      ""v"": """",
      ""p"": true
    }
  }
}
},

有没有办法记录对 Idp 进行的实际网络调用以查看问题所在? Idp 不受我的控制,因此我无法在那里记录它们。

最佳答案

虽然我没有找到记录更多信息的方法,但我能够通过使用反向代理拦截对外部 IdP 的所有调用来解决我的问题。这表明 b2c 使用 client_secret_post 获取访问 token ,而 IdP 仅支持 client_secret_basic

关于azure - 使用 Azure AD B2C 中的自定义策略记录对身份提供程序的调用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57109533/

相关文章:

azure - 机器人模拟器错误 : POST 400 directline. postActivity

java - Spring oAuth2 中的 AuthenticationScheme 和 ClientAuthenticationScheme 有什么区别?

security - 用户可以在 oauth 2.0 中一次拥有两个有效 token 用于身份验证代码授予类型吗?

Azure B2C SSO 配置选项差异

file - 在 Azure 中使用文件压缩/加密

c# - Web 服务 - SQL 连接字符串

python - 在 Azure Databricks 中按范围内的值进行分组

node.js - 获取访问 token 有效性

Azure AD B2C 使用图形 API 创建用户

reactjs - 带有 msal-react 包装器 acquireTokenSilent 的 msal-browser 无法从缓存获取访问 token