MSAL Azure AD B2C authentication not working in chrome - incognito
Asked Answered
R

3

5

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)

Raoul answered 5/8, 2020 at 3:41 Comment(8)
I would be helpful for us if you can share the application detail, starter pack details, msal version or the development which you are refering.Macready
@Raghavendra-MSFTIdentity - Thanks for looking into this. I have added the starter pack details. Our application use 1.2.1 version of msal but if the acquiretokensilent doesn't work in starter pack with the latest version, it will not probably work in our application as well. Let me know if you have any other questionsRaoul
Thanks for the details provided. I will get back to you on thisMacready
I tried the starter pack by calling the acquiretokensilent after successful login as you mentioned. I received an error User does not have an existing session and request prompt parameter has a value of 'None'.. This issue is arised due to not enabling the popup in chrome incognito mode. once i enabled the popup i was successfully able to call acquiretokensilent with out any error. Let me know if you are facing any issue not related to thisMacready
Hi Sujeeth, have you tried the suggestion provided by @Raghavendra-MSFTIdentity? Any updates?Aleciaaleck
@AllenWu - I have tried enabling popups but didn't help. I am still getting the same error and the only other idea that I am left with is to try redirect (rather than popup) with the starter pack. I am facing issues setting up redirect in starter pack but I am working on it. Are you also facing the same issue?Raoul
@AllenWu - Enabling the popups didn't work but allowing cookies helped. I commented the same to the solution posted belowRaoul
@Raoul Glad to hear this. You can post your answer so that more people will be helped.Aleciaaleck
R
5

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

Raoul answered 14/8, 2020 at 13:3 Comment(0)
G
1

You can even provide sites to have cookies for current session.

CHROME SETTINGS --> PRIVACY AND SECURITY --> COOKIES AND OTHER DATA DATA -->

Sites that can always use cookies --> add site

For aquiresilenttoken(), add https://login.microsoftonline.com/*

Or your preferred authority URL.

Gracielagracile answered 15/2, 2021 at 14:1 Comment(0)
M
0

Moving answer from comments

I tried the starter pack by calling the acquiretokensilent after successful login as you mentioned. I received an error

User does not have an existing session and request prompt parameter has a value of 'None'

The reason for this issue is due to not enabling the popup in chrome incognito mode. once i enabled the popup i was successfully able to call acquiretokensilent with out any error.

Macready answered 13/8, 2020 at 17:50 Comment(3)
enabling the popups didn't work for me. But allowing the cookies in in-cognito resolved the issue. Steps to enable cookies in chrome browser settings Chrome settings -> Privacy and Security -> Cookies and other site data -> 'Allow all cookies'Raoul
@Raoul Glad to hear this.Thank you for letting us know.Macready
@Raoul could you accept it as answer to help others to find it more easily?Sarmentum

© 2022 - 2024 — McMap. All rights reserved.