Skip to content

[Bug] WSL broker in admin terminal fails: Unexpected winrt exception while launching accounts control from UI thread: '(pii)'. #810

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

Open
jiasli opened this issue Apr 15, 2025 · 2 comments

Comments

@jiasli
Copy link
Contributor

jiasli commented Apr 15, 2025

Describe the bug
WSL broker in admin terminal fails: Unexpected winrt exception while launching accounts control from UI thread: '(pii)'.

To Reproduce
WSL version:

> wsl --version
WSL version: 2.4.13.0
Kernel version: 5.15.167.4-1
WSLg version: 1.0.65
MSRDC version: 1.2.5716
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26100.1-240331-1435.ge-release
Windows version: 10.0.26100.3775

Launch Windows Terminal as administrator, in WSL with enable_broker_on_wsl=True, acquire_token_interactive fails with:

Unexpected winrt exception while launching accounts control from UI thread: '(pii)'. Status: Response_Status.Status_Unexpected, Error code: -2147220999, Tag: 528315209

enable_pii_log (#590) is already enabled (Azure/azure-cli#28954), but the error message still shows (pii).

Expected behavior
acquire_token_interactive should work as expected.

What you see instead
acquire_token_interactive fails.

The MSAL Python version you are using
Latest dev branch.

Additional context
Add any other context about the problem here.

@DharshanBJ
Copy link
Contributor

@jiasli, could you please share the exact steps to reproduce it? Are you launching Windows Terminal in admin mode using the same user account that is the administrator on the device?

@jiasli
Copy link
Contributor Author

jiasli commented Apr 16, 2025

Could you please share the exact steps to reproduce it?

May I know which additional step you need? The steps are simply:

  1. Launch Windows Terminal as administrator: Image
  2. Call acquire_token_interactive for organizations tenant.
  3. Choose the current Windows account ([email protected]).

Are you launching Windows Terminal in admin mode using the same user account that is the administrator on the device?

Yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants