Unable to sign on using custom policy

Steve Degenhardt 61 Reputation points
2020-07-21T16:01:48.297+00:00

I have followed all the steps here (https://learn.microsoft.com/en-us/azure/active-directory-b2c/custom-policy-get-started) in order to create a custom policy. I am able to create an account, but when I attempt to log in I receive the "Invalid username or password" message. I am able to use that account to log in using the built-in user flows but not the custom policies. Unfortunately, the documentation does not show full examples, but after re-reading this about 1000 times I think I am doing this correctly. If anyone has any suggestions on how to debug the issue or what I might be doing incorrectly, please let me know.

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,639 questions
{count} votes

Accepted answer
  1. 2020-08-07T16:53:17.507+00:00

    In your IdentityExperienceFramework app manifest:

    Change:

    "accessTokenAcceptedVersion": 2,

    To (default value):

    "accessTokenAcceptedVersion": null,


    Please let us know if this answer was helpful to you. If so, please remember to mark it as the answer so that others in the community with similar questions can more easily find a solution.

    3 people found this answer helpful.

8 additional answers

Sort by: Most helpful
  1. Satheesh Kumar 11 Reputation points
    2021-02-03T03:42:25.01+00:00

    @Alfredo Revilla - Senior Freelance SWE, SWA, IAM Similar issue as mentioned by others 1. Created custom policy 2. Able to run policy "B2C_1A_signup_signin" and create user 3. Post signup token created successfully and redirected to jwt.ms and able to see the created username in the token. 4. When i try to signin with the same created user it shows error message "The username or password provided in the request are invalid." 5. I could able to login with the newly created user through "Userflows"

    Read the document several times, deleted and recreated the two app(proxy and identityexp framework) registers mentioned in the documentation no success.

    Any help would be appreciated.63218-b2c-insights-query-data.txt

    2 people found this answer helpful.
    0 comments No comments

  2. Sharad Taur 11 Reputation points
    2021-03-31T16:41:48.15+00:00

    @Alfredo Revilla - Senior Freelance SWE, SWA, IAM ....any luck on this issue....i have followed every step of documentation but still not able to sign in using Custom Policy....it works for sign up but not for sign in

    2 people found this answer helpful.
    0 comments No comments

  3. NHering22101 106 Reputation points
    2021-04-13T08:03:22.167+00:00

    @Alfredo Revilla - Senior Freelance SWE, SWA, IAM same issue here with code flow. Any updates?

    1 person found this answer helpful.
    0 comments No comments

  4. Trung Nguyen 6 Reputation points
    2021-08-31T08:21:47.517+00:00

    Same issue. I was testing B2C_1A_SIGNUP_SIGNIN and I could create user but could not login.
    Then I read the document again and found out that "allowPublicClient": null, so I updated it as the document then I worked.
    Hope that helps!

    127788-image.png

    1 person found this answer helpful.