-
Notifications
You must be signed in to change notification settings - Fork 78
Note on B2C usage with msal js #49
Comments
@sameerag is this in the wiki somewhere? would be useful to have there and maybe more discoverable. |
I am working on making it official, we have some gaps to document. This will be in the wiki soon. The pinning of an issue is a temp alternative. |
It is mentioned here that SUSI V2 supports silent token acquisition. |
I've built a B2C custom policy using the starter pack and the instructions for multi-tenant AAD support. The policy works fine when I use it in my SPA application. However, when I want to navigate to another application from the same tenant in the same tab I'm always redirected to the B2C login page (I use the ssoSilent method to get the user session, and the the loginRedirect method if the session doesn't exist). I've checked in the browser, and I can see the B2C SSO cookie: x-ms-cpim-sso:<my_tenant>. But it is not picked up by my App. In my policy the Relaying Party has the SSO scope set to Tenant, as well as a Session Management Provider for the JWT Issuer to use the OAuthSSOSessionProvider. Is there something more that I need to add in the policy for SSO to work? The error I get from ssoSilent -> BrowserAuthError: monitor_window_timeout: Token acquisition in iframe failed due to timeout. NOTE: When I use a default SignIn policy (single AD tenant as the OpenID Connect Provider) than this use case works. |
Closing this as this sample is being archived. Please see the new sample and/or raise any issues you have at MSAL.js repo. |
msal js
supports B2C flows foracquireTokenSilent
but with certain conditions due to the manner in which B2C policies can manifest certain UI patterns.edit-profile
by default would need interaction and callingacquireTokenSilent
which renders a hidden iframe is blocked by the B2C service withx-frame-options
set todeny
We did some testing with our sample and have generated the below table:
It is possible that some IDPs are being called for silent calls where interaction is needed and B2C service is blocking the frame. We are investigating to improve this experience and throw proper errors for now but the above table can be used as a reference as we stabilize B2C experience in our samples for all policies.
The text was updated successfully, but these errors were encountered: