我正在按照此链接测试 AD B2C 智能锁定功能。
但是,在使用自定义策略的登录页面中,尽管我的 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
:
我可以知道解决此问题/常见原因的方向是什么吗?
编辑:从 Chrome 开发人员工具中,即使超出锁定阈值,调用也始终返回相同的
The username or password provided in the request are invalid.
响应。
我遇到了类似的问题,当用户被锁定时,这条确切的消息不会出现。只是我没有使用任何自定义用户策略,因此 Jas 建议的快速修复与我无关。
我发现我可以通过为用户流程启用自定义语言并覆盖该错误消息的默认值来使其正常工作:
{
"ElementType": "ErrorMessage",
"ElementId": null,
"StringId": "UserMessageIfUserAccountLocked",
"Override": true,
"Value": "Your account is temporarily locked to prevent unauthorized use. Try again later."
}