Reputation: 2172
I was trying for microsoft login in my windows 10 UWP app.
var authenticator = new Windows.Security.Authentication.OnlineId.OnlineIdAuthenticator();
var serviceTicketRequest = new Windows.Security.Authentication.OnlineId.OnlineIdServiceTicketRequest("wl.basic", "DELEGATION");
System.Diagnostics.Debug.WriteLine("Signing in...");
var authResult = await authenticator.AuthenticateUserAsync(serviceTicketRequest);
this was the code I was trying. I got exception at authenticator.AuthenticateUserAsync
The exception was
Exception thrown: 'System.Exception' in mscorlib.ni.dll
Additional information: The application requesting authentication tokens is either disabled or incorrectly configured. (Exception from HRESULT: 0x80860003) Anyone have Idea why this happening?
Upvotes: 4
Views: 1719
Reputation: 15758
The exception here is that your app didn't associate with the Windows Store.
To associate your app with the Windows Store, open your app's project file in Visual Studio:
After associating, you can avoid this exception and authenticate user with Microsoft Account.
Upvotes: 9