[WinUI 3 in UWP] Unable to login via default web account provider

Alfred See 51 Reputation points
2021-08-27T05:00:24.027+00:00

Hi,

Greetings. I'm trying out the experimental WinUI 3 in UWP. When I was testing fetching access token via Windows.Security.Credentials.WebAccountProvider, it keeps failing with:

The application requesting authentication tokens is either disabled or incorrectly configured.

>

onecoreuap\shell\cloudexperiencehost\onecore\app\msa\core\TokenProviderExecutor.cpp(1040)\MicrosoftAccount.TokenProvider.Core.dll!00007FFC117D1717: (caller: 00007FFC1180C3ED) Exception(1) tid(2194) 80860003 The application requesting authentication tokens is either disabled or incorrectly configured.

The app has already been associated with the Microsoft Store, and the Package.StoreAssociation.xaml file exists in the directory. When I tried the exact same code with the same association to the Microsoft Store in a normal UWP project, the login works as expected.

I was experimenting with WinUI3 in UWP because I need to use WebView2, but ^ is the main blocker for me to continue the experiment. It would be much appreciated if anyone can help resolve this issue. Thanks!

Universal Windows Platform (UWP)
Windows App SDK
Windows App SDK
A set of Microsoft open-source libraries, frameworks, components, and tools to be used in apps to access Windows platform functionality on many versions of Windows. Previously known as Project Reunion.
725 questions
{count} votes