Skip to content

Instantly share code, notes, and snippets.

@devhawk
Created November 26, 2012 22:37
Show Gist options
  • Select an option

  • Save devhawk/4151122 to your computer and use it in GitHub Desktop.

Select an option

Save devhawk/4151122 to your computer and use it in GitHub Desktop.
SSO Code for Win8 apps
var authClient = new LiveAuthClient();
LiveLoginResult authResult = await authClient.LoginAsync(
new List<string>() { "wl.signin", "wl.basic" });
if (authResult.Status == LiveConnectSessionStatus.Connected)
{
LiveConnectClient client = new LiveConnectClient(authResult.Session);
LiveOperationResult liveOpResult = await client.GetAsync("me");
string name = (string)liveOpResult.Result["name"];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment