Share via

Azure AD B2C custom policy Sign In issue

Fispoke DevOps 20 Reputation points
2026-03-12T09:52:21.1933333+00:00

Issue Description

I am implementing a custom policy in Azure AD B2C.

The same local user account is able to sign in successfully using a built‑in User Flow policy. However, when I attempt to sign in using a Custom Policy, the sign‑in fails.

Observed Behavior

When using the Custom Policy, clicking the Sign In button results in a frontend validation error:

Invalid username or password

At the same time, when I check the Azure AD B2C Sign‑in logs, the authentication status shows Success for the same sign‑in attempt.

Summary

  • ✅ Sign‑in works correctly with User Flow policy
  • ❌ Sign‑in fails with Custom Policy
  • ❌ Frontend shows Invalid username or password
  • ✅ Azure AD B2C Sign‑in logs show Success

    Issue Description

    I am implementing a custom policy in Azure AD B2C. The same local user account is able to sign in successfully using a built‑in User Flow policy. However, when I attempt to sign in using a Custom Policy, the sign‑in fails.

    Observed Behavior

  • When using the Custom Policy, clicking the Sign In button results in a frontend validation error:

    Invalid username or password

  • At the same time, when I check the Azure AD B2C Sign‑in logs, the authentication status shows Success for the same sign‑in attempt.

    Summary

    • ✅ Sign‑in works correctly with User Flow policy
    • ❌ Sign‑in fails with Custom Policy
    • ❌ Frontend shows Invalid username or password
    • ✅ Azure AD B2C **Sign‑in logs show Success
Microsoft Security | Microsoft Entra | Microsoft Entra External ID

2 answers

Sort by: Most helpful
  1. RoryB 540 Reputation points
    2026-03-12T21:34:07.5666667+00:00

    Do other custom policies work?

    If this is a new installation, this error is sometimes because B2C has not been set up correctly.

    https://learn.microsoft.com/en-us/azure/active-directory-b2c/tutorial-create-user-flows?pivots=b2c-custom-policy

    There is a tool to do this:

    https://b2ciefsetupapp.azurewebsites.net/

    The other reason is that the "login-NonInteractive" technical policy in the extension file is not configured correctly.

    1 person found this answer helpful.
    0 comments No comments

  2. Fispoke DevOps 20 Reputation points
    2026-03-13T07:37:02.74+00:00

    After delete and create new IdentityExperienceFramework and ProxyIdentityExperienceFramework Application and reupload policy xml files my issue fixed thanks


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.