Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.
If you find these projects useful please consider becoming a sponsor with Patreon, GitHub or Liberapay.

Include the feature parameter msSingleSignOnOSForPrimaryAccountIsShared

Post Reply
2eck
Posts: 1
Joined: Thu Apr 11, 2024 10:12 am

Include the feature parameter msSingleSignOnOSForPrimaryAccountIsShared

Post by 2eck »

Hello,

would it be possible to include the WebView2 commandline feature msSingleSignOnOSForPrimaryAccountIsShared ?
I'm having issues with MSAL authentication protocal on websites using MS Entra-ID authentication, where Outlook.exe and teams.exe - that are both using WebView2 too - are working fine.

I've used Sysinternals Process Explorer to get the WebView2 commandline parameters for both MS Apps, and the only major differens is --enable-feature=msSingleSignOnOSForPrimaryAccountIsShared

"msSingleSignOnOSForPrimaryAccountIsShared If enabled, allows implicit sign-in to Microsoft webpages using any account, by using the information from the primary OS account."
-> https://learn.microsoft.com/en-us/microsoft-edge/webview2/concepts/webview-features-flags?tabs=dotnetcsharp

The authentication was successful after adding this to my code:
GlobalWebView2Loader.EnableFeatures := 'msSingleSignOnOSForPrimaryAccountIsShared';

eventough MS states that MSAL and Entra-ID is not possible because it's disabled feature because there were stability issues during testing ->
https://learn.microsoft.com/en-us/entra/msal/dotnet/advanced/webview2

So a property or setting to enable this setting might save some guys a lot of sleepless nights ;-)
User avatar
salvadordf
Posts: 4563
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Include the feature parameter msSingleSignOnOSForPrimaryAccountIsShared

Post by salvadordf »

Thank you for this information! :D

I just uploaded a new WebView4Delphi version with a GlobalWebView2Loader.MicrosoftSignIn property to allow implicit sign-in to Microsoft webpages.
Post Reply