Closed rayluo closed 3 years ago
Before this PR, MSAL would always launch the default browser. After this PR, MSAL would launch Edge browser when running on Linux and when Edge is available. Here we document the different user experience of the two approaches when end user is on Linux and potentially accessing resources that are protected by device-based Conditional Access (CA) policy.
For resources require no device-based CA, it would just work. And, typically user would already have a valid signed-in session (i.e. cookie) in their default browser, so, they even get SSO. This is the most ideal case.
For resources require device-based CA, user will be prompted during the sign-in experience. The suggestion of using Edge is currently in the fine print at the end of slide No.3 in this internal document: Enrollment - high level experience .pptx
If you have already enrolled with Intune, use Microsoft Edge with your work or school profile to access this resource.
Note that the error page above only mentions a vague "use Edge", it does NOT cover how to enable Edge for a specific app. And I doubt any MSAL-powered app would bother convey that instruction beforehand.
Even if the end user somehow figure out 2 & 3, he would repeatedly run into the same issue each time he is going to access that resource, which is annoying. To make the things worse, on Linux there is no universal way to specify a browser as default browser. The BROWSER=microsoft-edge
way happens to work in Python, but end user may not know that. There would be some trial-and-error for the end user here.
For resources require no device-based CA, the very first time after Edge being installed into this desktop, the Edge will pop up, it contains no signed-in session, so that end user would need to sign in again. That is suboptimal, but at least it would be much easier than the 3 & 4 above. (However, there is currently a known issue: currently the sign-in experience does not (yet?) present a "Stay signed in?" option to end user from Linux. We started an internal conversation here.)
After the sign-in in situation 1 above, the situation 2 here would just work. The end users don't have to read those fine print.
Not applicable.
Not applicable.
UPDATE: We ended up using the second bullet point's approach.
I know this is long done and gone but my issue was the last one linked so I wanted to comment.
IMHO I found this unfortunate that you took away the Linux Users choice of default browser. This has led me to remove Edge from my system and will not be re-introduced.
IMHO I found this unfortunate that you took away the Linux Users choice of default browser. This has led me to remove Edge from my system and will not be re-introduced.
Fair enough. In case you want to try Edge again but want to have MSAL Python (thus Azure CLI) honor your default browser, you can set an env var BROWSER=firefox_excutable_file
.
Why is the standard browser explicitly ignored and instead it opens edge? This is totally unexpected Behaviour. Why do you not accept my decision on not making edge the standard browser?
Edge will soon become the first browser on Linux to support device-based conditional access policy. This PR has MSAL to prefer using Edge for
acquire_token_interactive()
.How to test this feature?
pip install git+https://github.com/AzureAD/microsoft-authentication-library-for-python.git@prefer-edge-on-linux
.python interactive_sample.py config.json
:@chlowell @jiasli Please help review this feature.