Question

Microsoft Live ID is now called Microsoft Account. Having said that, let's say I log into Windows 8 as sam@email.com and run an app.

That app uses the Live SDK to access my Microsoft Account profile. Before it can do so, however, I must give it explicit permission and log in. So far, perfect.

Though I gave the app permission to sam@email.com I want to change it to janet@email.com so I click the app's Logout button which queries LiveAuthClient.CanLogout() from the SDK. Confusingly, the SDK returns false (I cannot log out).

Why not? Once the current Windows 8 user has logged into a Windows 8 app using the Windows Live SDK, how can they log out (when CanLogOut() always returns false)? Is there a setting or something to allow this?

Turns out that this question's answer (http://stackoverflow.com/questions/13294496/can-the-windows-8-live-sdk-use-another-microsoft-account-other-than-the-current) is inaccurate.

Was it helpful?

Solution

check your scope. if you use wl.signin, you cannot log out via code anymore because it's single sign in. Try to use wl.basic instead. More about scopes here. When you accidently used the wl.signin you have to log in your dashboard an remove the app connection by hand.

OTHER TIPS

this is the expected behaviour. Please take a look at the following link.

If the user signs in to Windows 8 with a Microsoft account or a local or domain account that is connected to a Microsoft account, providing a custom sign-out button has no effect. So the only way to have a user connect to apps with different Microsoft Accounts is if the user has not associated his Microsoft Account with Windows 8.

Hope this helps...

Make sure you don't use "wl.signin" in your scopes. If you have been testing your app with this in, go into your account preferences for your live account and remove this option from the app's access. This will now allow more than one user to sign in.

    private LiveAuthClient authClient;

private void PhoneApplicationPage_Loaded_1(object sender, RoutedEventArgs e)
{
    this.authClient = new LiveAuthClient("yourclientidhere");
}
then you can call this.authClient.Logout(); when you want to change users.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top