fix(sdk): Mark MSAL as supported on the desktop target - #24084
Merged
Conversation
The AuthenticationMsal UnoFeature gates Microsoft.Identity.Client, Microsoft.Identity.Client.Extensions.Msal and Uno.WinUI.MSAL behind IsMSALSupported, which android, ios, wasm and winappsdk set - but not desktop. Uno.Extensions.Authentication.MSAL.WinUI is injected unconditionally, so on netX.0-desktop the three packages still come in, just transitively at their nuspec floors (e.g. Uno.WinUI.MSAL 6.0.465 alongside a current Uno.WinUI) instead of the Uno.Sdk-pinned versions. MSAL has always worked on desktop - the loopback flow is pure MSAL.NET and the skia flavour's no-op WithUnoHelpers() is the correct behaviour there - and Microsoft.Identity.Client.Extensions.Msal is specifically the desktop token-cache helper, so desktop is the head that needs these pins most. Marking it supported makes the feature resolve the same SDK-pinned versions as every other head. Verified with a desktop-only AuthenticationMsal app on Uno.Sdk 6.8.0-dev.12: as shipped it resolves Uno.WinUI.MSAL/6.0.465; with -p:IsMSALSupported=true it resolves Uno.WinUI.MSAL/6.8.0-dev.22 and Microsoft.Identity.Client(.Extensions.Msal)/4.87.0. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019BJKK7KeJ14DVxxW5UmJqo
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the Uno SDK’s desktop target configuration so the AuthenticationMsal UnoFeature resolves the same SDK-pinned MSAL package versions on netX.0-desktop as it already does on Android/iOS/WASM/WinAppSDK. This addresses version drift caused by relying on transitive “nuspec floor” versions on desktop.
Changes:
- Set
IsMSALSupported=truefor the desktop target (Uno.Common.Desktop.targets) to enable the MSAL implicit references gate for desktop builds.
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
1 task
Contributor
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-24084/wasm-skia-net9/index.html |
ajpinedam
approved these changes
Aug 14, 2026
Contributor
|
Tick the box to add this pull request to the merge queue (same as
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GitHub Issue: none — found while building the MSAL + Uno.Extensions sample for Uno.Samples; happy to file one if preferred.
PR Type:
🐞 Bugfix
What changed? 🚀
IsMSALSupportedgates theAuthenticationMsalUnoFeature's implicit references toMicrosoft.Identity.Client,Microsoft.Identity.Client.Extensions.MsalandUno.WinUI.MSAL. It is set by the android, ios, wasm and winappsdk common targets — but not desktop, and it is the only consumer of the property (no error targets or linker configs key off it).The gate doesn't actually keep MSAL off desktop:
Uno.Extensions.Authentication.MSAL.WinUIis injected unconditionally, and its desktop TFM drags all three packages in transitively at their nuspec floors. The observable effect is silent version drift, e.g. on Uno.Sdk6.8.0-dev.12:MSAL has always worked on desktop — the loopback flow is pure MSAL.NET, and the skia flavour's no-op
WithUnoHelpers()is the correct behaviour there.Microsoft.Identity.Client.Extensions.Msalis specifically the desktop token-cache helper (DPAPI / keychain / keyring), so desktop is the head that needs these pins most (mobile persists natively).This sets
IsMSALSupported=trueinUno.Common.Desktop.targets, mirroring the other heads, soAuthenticationMsalresolves the same SDK-pinned versions everywhere. MacCatalyst is intentionally not touched (dropped from the Uno.Sdk in f91aa26).Validation: desktop-only
AuthenticationMsalapp on Uno.Sdk 6.8.0-dev.12 —dotnet restoreas shipped resolvesUno.WinUI.MSAL/6.0.465;dotnet restore -p:IsMSALSupported=true(equivalent to this change) resolvesUno.WinUI.MSAL/6.8.0-dev.22andMicrosoft.Identity.Client(.Extensions.Msal)/4.87.0.PR Checklist ✅
Screenshots Compare Test Runresults.🤖 Generated with Claude Code
https://claude.ai/code/session_019BJKK7KeJ14DVxxW5UmJqo