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

1 answer

Sort by: Most helpful
  1. RoryB 455 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.

    0 comments No comments

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.