Page 1 of 1

Include the feature parameter msSingleSignOnOSForPrimaryAccountIsShared

Posted: Wed Jul 24, 2024 6:17 pm
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 ;-)

Re: Include the feature parameter msSingleSignOnOSForPrimaryAccountIsShared

Posted: Thu Jul 25, 2024 8:35 am
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.