Hi @Karikalan Ramakrishn • Thank you for reaching out.
I understood that you are getting the 401 Unauthorized error while accessing your SAML-based application after restarting the browser session without signing off. As the problem can be fixed by clearing the browser session, I suspect the issue is happening due to cookie-based single sign-on. To avoid this, you can try the below options:
- Set the single sign-on configuration to suppressed by configuring the RP file as mentioned below:
<UserJourneyBehaviors> <SingleSignOn Scope="Suppressed" /> <SessionExpiryType>Absolute</SessionExpiryType> <SessionExpiryInSeconds>86400</SessionExpiryInSeconds> </UserJourneyBehaviors>
- Configure your application to send the SAML request with ForceAuthn parameter set to
true
. This means, users will be forced to re-authenticate, even if they have a valid session with B2C. - If you have KMSI enabled, try disabling it as well, without the single sign-on configuration to suppressed by removing the
KeepAliveInDays
parameter as mentioned below:
This could be due to some configuration issue where the Technical Profiles being called during the User Journey are not properly configured with SamlSSOSessionProvider. So this is worth investigating.<RelyingParty> <DefaultUserJourney ReferenceId="SignUpOrSignIn" /> <UserJourneyBehaviors> <!-- <SingleSignOn Scope="Tenant" KeepAliveInDays="30" /> --> <SingleSignOn Scope="Tenant" /> <SessionExpiryType>Absolute</SessionExpiryType> <SessionExpiryInSeconds>1200</SessionExpiryInSeconds> </UserJourneyBehaviors>
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.