-
Notifications
You must be signed in to change notification settings - Fork 203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable broker support on Linux for WSL #766
base: dev
Are you sure you want to change the base?
Conversation
/azp run MSAL-Python-SDL-CI |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this PR looks good to me. And please make sure get an approval from Ray.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for a clean PR! Implementation wise, it looks good. I added some suggestions above, mostly in terms of our workflow. Please make corresponding changes and then wait for the PyMsalRuntime release.
Co-authored-by: Ray Luo <[email protected]>
Co-authored-by: Ray Luo <[email protected]>
Co-authored-by: Ray Luo <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will also need to change the precise dependency version error message here and a approximate version hint there
updated |
@DharshanBJ, I would love to see this wrapped up. I arrived here after trying to debug errors with using msal on WSL. This PR worked "as-advertised" and made my life a whole lot easier. Before your PR, the following snippet kept returning a browser window with Testing with app = PublicClientApplication(
<client_id>,
authority=<authority>,
enable_broker_on_linux=True,
)
app.acquire_token_interactive(...) |
Yes, this can be done, we'll remove this as part of the next msal.wsl.proxy release |
Co-authored-by: Ray Luo <[email protected]>
Co-authored-by: Ray Luo <[email protected]>
Co-authored-by: Ray Luo <[email protected]>
Co-authored-by: Ray Luo <[email protected]>
Co-authored-by: Ray Luo <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your effort all this time! Approving now, and I'll follow up with the merge and then the release shortly after.
Tested the code in Azure/azure-cli#31169, but can't get it working. The behavior is different from
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't launch account selection window.
Please upgrade to WSL 2.4.13+
@DharshanBJ , can you investigate this one? |
Checked with jiasli, the issue is due to not having WSL 2.4.13+, since the user is not able to acquire the token interactively(due to not having the account picker changes), the error message "Authentication failed against tenant 72f988bf-86f1-41af-91ab-2d7cd011db47 'Microsoft': Can't find token from MSAL cache." is for that same reason. |
I checked update in both Windows Store and Windows Update, but WSL is still on an old version
https://learn.microsoft.com/en-us/windows/wsl/install should contain a section on "How to update WSL". Also, we can't force or expect the users to update WSL to the latest version manually. It is better to have WSL updated by Windows Store or Windows Update automatically. Besides this, the interface of this functionality looks good to me. |
No description provided.