B2C password reset by administrator

Milorad Savcic 51 Reputation points
2022-12-04T17:40:45.367+00:00

I have a situation where the user's cannot reset their password because of delayed email delivery on their side so the verification code expires. I have found that the code expires in 5 minutes and as per some answers on stack overflow, though nothing in the official docs, this cannot be modified and is a hard limit.

So I tried to reset the password manually using the azure portal's B2C Users view, which does not work either because what seems to happen is that the force password reset flag is updated to true, thus preventing the user from performing a sign-in at all, to elaborate a bit more what we use are custom policies and we have not taken into account the force password reset flow as the assumption was that the Forgot password flow is sufficient (however due to the fixed, unmodifiable limit of 5 minutes it is not)

I have tried a script using GraphAPI which puts the forcePasswordReset flag to false, leaving the user with the auto-generated password, however this does not work either I get a message that the permissions are insufficient to perform this operation, however I am not sure which permissions as I am in the global administrator role. Furthermore I have discovered that the B2C tenant does not allow this operation (PATCH beta/users/{user-id}), but again no official docs for this, just some answers on stack overflow.

Question that I have is:
Is there any way for an administrator to reset a user's password without introducing new flows or modifying existing ones? Either by invoking GraphAPI or by using the azure portal's B2C users administration (which seems useless at the moment as it does not provide a basic user identity administration task such as resetting a password)

Microsoft Entra External ID
Microsoft Entra External ID
A modern identity solution for securing access to customer, citizen and partner-facing apps and services. It is the converged platform of Azure AD External Identities B2B and B2C. Replaces Azure Active Directory External Identities.
2,662 questions
{count} votes

Accepted answer
  1. Akshay-MSFT 16,126 Reputation points Microsoft Employee
    2022-12-07T09:24:04.493+00:00

    Hello @Milorad Savcic ,

    Thank you for posting your query on Microsoft Q&A.

    268077-image.png

    • Once permission is granted you could use passwordProfile property to generate a new password and set forceChangePasswordNextSignIn": false,

    268125-image.png

    Please do let me know if you have any further queries in the comments section.

    Thanks,
    Akshay Kaushik

    Please "Accept the answer", "Upvote" and rate your experience if the suggestion works as per your business need. This will help us and others in the community as well.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful