Managing external identities to enable secure access for partners, customers, and other non-employees
Hello Fispoke DevOps,
The Azure AD B2C wrapper error AADB2C90273 indicates that the external IdP returned a failure. In reality, the failure is:
- AADSTS9002325:In order to redeem a cross-origin authorization code, the Proof Key for Code Exchange is necessary. The source of this problem is Microsoft Entra ID.
- The underlying cause In order to enforce PKCE, the external Entra ID app registration is set up as a SPA/Public client. Entra ID rejects the request because Azure AD B2C does not use PKCE and instead redeems the authorization code as a confidential backend client.
Entra ID rejects the request because Azure AD B2C does not use PKCE and instead redeems the authorization code as a confidential backend client.
After converting the app to a confidential Web application, the PKCE error and AADB2C90273 will be resolved.
The error "AADB2C90238: The provided token does not contain a valid issuer" shows a issuer mismatch between Azure AD B2C and the external IdP token.
The OIDC is configured as
YAML
https://login.microsoftonline.com/organizations/v2.0/.well-known/openid-configuration
Issuer validation fails when organizations is used because the token issuer (iss) becomes tenant-specific and does not precisely match what B2C wants.
Hence to resolve the error, Change the OIDC metadata URL in B2C to the endpoint that is tenant specific endpoint:
YAML
https://login.microsoftonline.com/<External-Tenant-ID>/v2.0/.well-known/openid-configuration
Use the GUID Tenant ID, not organizations.
The issuer validation problem (AADB2C90238) will be fixed after the tenant-specific metadata endpoint has been updated.
The error "AADB2C90273 AADSTS9002325: Proof Key for Code Exchange is required for cross-origin authorization code redemption" Verifies that the external Microsoft Entra ID app is still in use to enforce PKCE. This is not a B2C problem.
When B2C redeems the authorization token, Entra needs PKCE since the external IdP application is still regarded as a public/SPA client.
Hence to resolve the error,
In the external Microsoft Entra ID App Registration:
- Remove Single-Page Application (SPA) platform completely
- Ensure only Web platform exists
- Add redirect URI under Web:
https://<b2c-tenant>.b2clogin.com/<b2c-tenant>.onmicrosoft.com/oauth2/authresp - Create a client secret and configure it in Azure AD B2C OIDC IdP settings
- If you have enabled Allow public client flows then set it as NO
The external app's configuration as a public client is the cause of the failure. The PKCE problem and AADB2C90273 will be fixed if the application is strictly converted to a secret Web application.
If the resolution was helpful, kindly take a moment to click on
and click on Yes for was this answer helpful. And, if you have any further query do let us know.