Search code examples
google-chromeazure-ad-b2cazure-ad-msalincognito-mode

MSAL Azure AD B2C authentication not working in chrome - incognito


Google's chrome browser update from 84.0.4147.89 to 84.0.4147.105 has broken MSAL login (authentication) in Incognito window for our application.

To verify that there is no issue with our application, I have tried Azure AD B2C login with the starter pack in Incognito browser and I see the same behavior. Has anyone experienced the same issue?

A similar issue was posted in the past by few developers. But the solution provided doesn't help. https://support.google.com/chrome/thread/38855209?hl=en

FYI: Login works as expected in Chrome regular browser and other browsers

Starter pack details: https://github.com/Azure-Samples/active-directory-b2c-javascript-msal-singlepageapp

Starter pack has msal 1.3.3 version. Couple of days ago, 1.3.4 version has been released and I tried that as well. I see an error during acquiretokensilent(CallApi) in incognito while I don't get the same exception in regular window

The only difference between starter pack and our application is that we call acquiretokensilent immediately after the login is successful but in the starter pack acquiretokensilent is called on a button click(CallApi)


Solution

  • Azure AD B2C login issue in incognito window is fixed for me by enabling cookies in the google chrome settings. Below are the steps to enable cookies.

    Chrome settings -> Privacy and Security -> Cookies and other site data -> 'Allow all cookies'

    Enabling Cookies in Chrome browser