Azure AD B2C 使用内置策略时出现’无效的用户名或密码’。

huangapple go评论78阅读模式
英文:

Azure AD B2C 'Invalid username or password' when using built-in policies

问题

我已设置了Azure AD B2C租户并创建了一个应用程序注册。我只使用本地帐户。几个月前,我创建了两个用户。今天,我尝试使用内置的“SignUpSignIn”流程登录这两个用户。然而,我一直收到“用户名或密码无效”的错误,尽管用户存在于我的租户中并且用户名正确。我甚至尝试再次将用户添加到租户中,使用注册流程,但却正确地收到了“此用户名已存在”的错误。

我在SO上查找了这个错误,注意到当使用自定义策略时,人们会遇到这个问题。但是,我没有任何自定义策略。我只是使用内置策略。

只是为了确认这只是与现有用户有关的问题,我创建了一个新用户并尝试重现错误。然而,我在使用这个新用户时没有遇到同样的问题。我能够正常登录这个新用户。问题似乎只发生在我以前创建的用户身上。

有人可以指导我正确的方向吗?谢谢!

英文:

I have setup an Azure AD B2C tenant and created an application registration. I am using local accounts only. I created two users a few months ago. Today, I tried to sign-in using these two users using the built in 'SignUpSignIn' flow. However, I keep getting the error "Invalid username or password", even though the user exists in my tenant and has the right username. I even tried to add the user again to the tenant using the signup flow, but, correctly received the 'this username already exists' error.

I looked up this error on SO and noticed that folks have run into this issue when using Custom Policies. However, I do not have any custom policies. I'm just using the built-in policies.

Just to confirm that it is only a problem with existing users, I created a new user and tried to reproduce the error. However, I am not having the same issues with this new user. I am able to login without any problems with this new user. The problem only seems to be happening with the users I have previously created.

Can anybody please guide me in the right direction? Thanks!

Azure AD B2C 使用内置策略时出现’无效的用户名或密码’。

答案1

得分: 2

看起来我已经弄清楚了。当我一段时间后使用这些用户登录时,我忘记了他们的密码。在重置密码时,我使用了用户个人资料中的 重置密码 选项,而不是使用 'ForgotPassword' 策略。这导致了在注册登录流程中出现上述错误。

相反,您必须使用 'ForgotPassword' 内置策略来重置用户的密码。

英文:

Looks like I figured it out. As I was signing in with those users after a while, I had forgotten their passwords. When resetting the password, instead of using the 'ForgotPassword' policy, I used the Reset Password option in the user's profile. This caused the above error to show up during the SignupSignIn flow.

Azure AD B2C 使用内置策略时出现’无效的用户名或密码’。

Instead, you must use the 'ForgotPassword' built-in policy to reset the password for a user.

Azure AD B2C 使用内置策略时出现’无效的用户名或密码’。

huangapple
  • 本文由 发表于 2020年1月3日 16:18:42
  • 转载请务必保留本文链接:https://go.coder-hub.com/59575206.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定