自定义策略不返回帐户锁定错误 (50053)

问题描述 投票:0回答:1

我正在按照此链接测试 AD B2C 智能锁定功能。

我当前的智能锁定设置: enter image description here

登录日志显示我用于测试的账号已成功锁定: enter image description here

但是,在使用自定义策略的登录页面中,尽管我的 TrustFrameworkExtensions.xml 中有本地化字符串,但错误并未显示我的帐户被暂时锁定:

<LocalizedString ElementType="ErrorMessage" StringId="UserMessageIfUserAccountLocked">#Your account is temporarily locked to prevent unauthorized use. Try again later.</LocalizedString>

登录页面的错误消息始终是

The username or password provided in the request are invalid
:

enter image description here

我可以知道解决此问题/常见原因的方向是什么吗?

编辑:从 Chrome 开发人员工具中,即使超出锁定阈值,调用也始终返回相同的

The username or password provided in the request are invalid.
响应。 enter image description here

azure-ad-b2c password-protection azure-ad-b2c-custom-policy
1个回答
-1
投票

我遇到了类似的问题,当用户被锁定时,这条确切的消息不会出现。只是我没有使用任何自定义用户策略,因此 Jas 建议的快速修复与我无关。

我发现我可以通过为用户流程启用自定义语言并覆盖该错误消息的默认值来使其正常工作:

{
  "ElementType": "ErrorMessage",
  "ElementId": null,
  "StringId": "UserMessageIfUserAccountLocked",
  "Override": true,
  "Value": "Your account is temporarily locked to prevent unauthorized use. Try again later."
}
© www.soinside.com 2019 - 2024. All rights reserved.