Issues using MobileServiceClient and SingleSignOn authentication

1

So I was just messing around with Azure and decided to look at doing some authentication in a simple Windows 8.1 Xaml based application. I was following the steps outlined in this document.

I Currently setup MobileServices, added an application to the Microsoft Store portal, and also configured the Live Services as outlined in the above link.

Where I am having issues, is when trying to use the Microsoft Account auth SingleSignOn. What's happening is that if I connect using this code:

var client = new MobileServiceClient(MobileAppUrl, MobileAppKey);
var user = await client.LoginAsync(
    MobileServiceAuthenticationProvider.MicrosoftAccount, false);

then I get the correct dialog asking for an email and password. When I type it in, it authenticates fine, and works as expected. The problem is when I set the useSingeSignOn flag from false to true, I get the dialog, it asks for permission, and then it gives the following error:

We can't connect to the service you need right now. Check your network connection or try this again later.

Then will then cause an exception when I exit the dialog:

System.IO.FileNotFoundException: The specified protocol is unknown. (Exception from HRESULT: 0x800C000D)":null

I have quadruple checked my azure settings, and they are all correct, as far as I can tell. It's driving me nuts! I have Google and Googled and Googled and found nothing. So then I Binged (doesn't sound as good as Googled), with the same results.

Is there some super secret server setting I possibly missed? Any help/guidance would greatly be appreciated!

c#
azure
single-sign-on
windows-8.1
azure-mobile-services
asked on Stack Overflow Nov 2, 2013 by Sonoilmedico

1 Answer

1

Turns out that I just needed to use a different style of signing on. I had to login using the Live SDK, then use the authentication token from that into a different overload of LoginAsync. Now it all works.

answered on Stack Overflow Nov 2, 2013 by Sonoilmedico

User contributions licensed under CC BY-SA 3.0