初始登录时强制密码重置自定义策略不起作用

Force Password Reset on initial login custom policy not working

我正在尝试使用 Azure AD B2C:首次登录时强制重置密码 实现初始登录时重置密码。我使用用户名登录应用程序,而不是电子邮件地址。当我使用我的用户名登录时,我没有被重定向到密码重置页面,自定义属性也没有被清除。

我正在使用 Graph API 通过用户创建来设置自定义属性 Extenstion_000000000000000000000000000000000_ForcePasswordResetOnInitialLogin。你能告诉我哪里做错了吗?

我希望用户首次登录并被重定向以重置密码并清除自定义属性。

注意:我使用的是使用用户名登录,没有用户注册。所有用户均由 Graph API.

创建

我测试了您分享的这个示例,对我来说效果很好。

因此,如果您没有被重定向到密码重置页面,原因应该是您没有正确配置 UserJourney "SignUpOrSignIn"。

请将code of step 7 and step 8 (line 188 to 233) into your UserJourney "SignUpOrSignIn" in your TrustFrameworkExtensions.xml or TrustFrameworkBase.xml file. And note that if you add the code into TrustFrameworkBase.xml, you should also add the TechnicalProfile "AAD-UserRemoveMustResetPasswordUsingObjectId"添加到TrustFrameworkBase.xml文件的相应位置。

强制更改密码仅适用于登录策略。它不适用于 SignInSignUp 政策。看看讨论here

此功能已planned实施。