Skip to content

fix: update MSAL to 4.83.3 so system-browser sign-in works - #987

Merged
albertospelta merged 1 commit into
mainfrom
fix/system-browser-sign-in
Oct 21, 2026
Merged

albertospelta merged 1 commit into
mainfrom
fix/system-browser-sign-in

Conversation

@albertospelta

Copy link
Copy Markdown
Member

Problem

Signing in with "Use system browser for authentication" fails with AADSTS70007 ("unsupported mode"). The Entra app accepts only response_mode=form_post, and the loopback listener in MSAL 4.73.1 reads only query responses.

Change

  • Microsoft.Identity.Client.Desktop 4.73.1 -> 4.83.3. It uses form_post for the system browser. Same version as Power BI Desktop 2.159.
  • Microsoft.Web.WebView2 1.0.2739.15 -> 1.0.2903.40, the minimum MSAL Desktop 4.83.3 requires.
  • A target in Directory.Build.targets removes the WebView2 WPF reference in every SDK-style project, which caused MSB3277 ([Problem/Bug]: Found conflicts between different versions of "WindowsBase" that could not be resolved MicrosoftEdge/WebView2Feedback#4959).
  • The installer no longer packages Microsoft.Web.WebView2.Wpf.dll, which is no longer published.
  • CloudAuthenticationClient passes msafed=0 through the non-obsolete dictionary overload of WithExtraQueryParameters, outside the cache key.
  • packages.lock.json regenerated.

Verification

  • dotnet build Bravo.sln: 0 errors. No MSB3277 and no new warnings (the remaining ones are already on main).
  • dotnet test: 198/198 passed.
  • Tested by hand with the package change: sign-in works with both the system browser and the embedded browser.
  • The MSI build still needs to be checked, in CI or by hand.

The Entra app used by Bravo accepts only response_mode=form_post and
rejects the query response mode (AADSTS70007). The loopback listener in
MSAL 4.73.1 reads only query responses, so sign-in with the system
browser failed. MSAL 4.83.3 uses form_post for the system browser and
reads the POST body. This is the same version Power BI Desktop 2.159
ships.

MSAL Desktop 4.83.3 requires WebView2 1.0.2903.40 or later. That
package references its WPF control in every .NET project, and the WPF
assembly built for net5.0 references WindowsBase 5.0, which conflicts
with the framework's WindowsBase (MSB3277, WebView2Feedback#4959).
Bravo hosts only the WinForms control, so a target in
Directory.Build.targets removes the WPF reference before assembly
resolution in every SDK-style project, including the test project that
gets the package through Bravo.

The WPF assembly is no longer copied to the output, so the installer
transform stops packaging it.

MSAL 4.83 makes the string overload of WithExtraQueryParameters
obsolete. msafed=0 is now passed as a static read-only dictionary
through the new overload and kept out of the token cache key, because
it only filters the accounts offered at sign-in.
@albertospelta albertospelta added this to the 1.1.0 milestone Oct 21, 2026
@albertospelta
albertospelta merged commit 32ddc64 into main Oct 21, 2026
1 check passed
@albertospelta
albertospelta deleted the fix/system-browser-sign-in branch October 21, 2026 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant