Angular MSAL not recognizing JWT token from Azure B2C SAML Technical Profile redirect

Bhanu Reddy 1 Reputation point
2022-09-27T15:48:24.893+00:00

Context:
We have an existing Angular app that is authenticating with Azure AD B2C tenant users using MSAL 2.0 and PKCE flow. Configuration was done using B2C Custom Policies. We have a requirement to support "SP Initiated SAML SSO" with third-party external vendor.

Implementation:
1#
Enhanced Custom Policies by creating SAML Technical profile section in TrustFrameworkExtensions, by following documentation links like below https://learn.microsoft.com/en-us/azure/active-directory-b2c/identity-provider-generic-saml?tabs=windows&pivots=b2c-custom-policy
https://learn.microsoft.com/en-us/azure/active-directory-b2c/identity-provider-adfs-saml?tabs=windows&pivots=b2c-custom-policy

2#
Also, followed links like below to configure linking of local user with federated user

https://learn.microsoft.com/en-us/azure/active-directory-b2c/user-profile-attributes?WT.mc_id=AZ-MVP-5003445#identities-attribute

By running the policy, SAML AuthN request was sent to external SAML provider & successfully received SAML Response. By redirecting to https://jwt.ms, equivalent JWT tokens are received in the id_token parameter & access_token parameter
Eg:- (Policy triggered with below link)
https://

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
35,971 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. 2022-09-30T21:15:38.497+00:00

    Hello @Bhanu Reddy and thanks for reaching out. Most possible cause of AADB2C90079 error being thrown is app registration being set as web (confidential), which expects a client secret. Configure it as SPA (public) and let us know.

    Let us know if you need additional assistance. If the answer was helpful, please accept it and complete the quality survey so that others can find a solution.

    1 person found this answer helpful.
    0 comments No comments