I'm using the v5.3 Live SDK for a Windows 8 Store App (XAML/C#) and I have a question.
I know how to do all that using the Live SDK, but my question is - how can I tell if the user is logged into Windows with a Microsoft account versus a Local Account that hasn't been logged in to the MS account?
I can use the following:
var idAuth = new OnlineIdAuthenticator();
return idAuth.CanSignOut;
but this will return false if either the 2 criteria above is true (and return true if the user is using a local account, but has logged in to my app using Microsoft account details).
In theory, if the above returns false, I can do the following:
LiveAuthClient authClient = new LiveAuthClient();
LiveLoginResult authResult = await authClient.LoginAsync(new List<string>() { "wl.signin" });
if (authResult.Status == LiveConnectSessionStatus.Connected)
{ //Get user info here }
The problem is that this works fine for a user logged into windows using a Microsoft Account - their info is picked up fine, but if it is a user logged into Windows with a local account, then it is going to show the Live Login screen in my app - at that point I don't want to do that, rather just show a logon button in my UI.
Anyone any ideas on how to tell the difference between the 2 criteria above?
Thanks in anticipation, Richard.
I ended up asking the same question on the MSDN forums and got an answer there, so I am posting it here just in case it helps anyone else.