Share via

Getting error while testing B2C authentication to customer IDP

Admin at PeriGenSolutions 0 Reputation points
2026-03-13T14:46:52.1833333+00:00

AADB2C90273: An invalid response was received : 'Error: invalid_request,Error Description: AADSTS9002325: Proof Key for Code Exchange is required for cross-origin authorization code redemption. Trace ID: 2d80dfc4-e9d4-4f62-a0f8-6c3d91210400 Correlation ID: 230760ed-<removed PII> Timestamp: 2026-03-12 17:36:47Z'

There are no extra logs to diagnose the problem on the B2C side. The customer says they are enforcing PKCE by default.

Can anyone provide any insight?

Microsoft Security | Microsoft Entra | Microsoft Entra External ID

1 answer

Sort by: Most helpful
  1. VEMULA SRISAI 11,330 Reputation points Microsoft External Staff Moderator
    2026-03-13T15:42:58.2566667+00:00

    Hello Admin at PeriGenSolutions,

    The error is not originating from Azure AD B2C itself. AADB2C90273 is a generic B2C error indicating that the external IdP (customer’s Entra ID tenant) returned an invalid response. In your case, the actual failure is AADSTS9002325, which is enforced by the customer’s Entra ID.

    This usually happens when the Entra ID app registration used as the identity provider for B2C is configured as a SPA, while B2C performs the authorization‑code exchange via its server-side /oauth2/authresp endpoint. When marked as SPA, Entra expects PKCE for cross‑origin code redemption, which does not align with how B2C completes the federation flow.

    Recommended fix:

    In the customer’s Entra ID tenant, update the app registration used for B2C federation to a Web (confidential) application

    Add the redirect URI: https://<b2c-tenant>.b2clogin.com/<b2c-tenant>.onmicrosoft.com/oauth2/authresp

    Ensure the IdP is configured in B2C using a client secret or certificate

    PKCE can remain enforced for the customer’s own SPAs, but B2C federation should use a Web/confidential client configuration. Once this alignment is corrected, the AADSTS9002325 error typically resolves.

    Please have the customer validate this configuration on their Entra ID side and retry the user flow.

    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.