title: Metro App - How to detect if logged in with Live ID or Local Account
body: <p>I am building a Metro C# SkyDrive API on top of the Live Connect SDK (http://msdn.microsoft.com/en-us/live/default) - in Windows 8 the user has the choice to SignIn to the Windows 8 machine with either a LOCAL account, or a LIVE account.  </p>
  
  <p>When using the Live Connect SDK, if I call</p>
  
  <pre><code>// assume wlscopes is properly set
  
  LiveAuthClient liveAuthClient = new LiveAuthClient();
  LiveLoginResult loginResult = await liveAuthClient.LoginAsync(wlscopes);
  
  // do some stuff on skydrive
  
  liveAuthClient.Logout();   // &lt;-- issue only with live account, not local
  </code></pre>
  
  <p>when using a LOCAL account, it logs me out (great)</p>
  
  <p>When I call the same code when using a LIVE account, I get an unhanded exception -- I cannot even add a try {} catch {} around this error.</p>
  
  <p>Exception:</p>
  
  <pre><code>Cannot sign out from the application since the user account is connected. (Exception from HRESULT: 0x8086000E)
  </code></pre>
  
  <p>Obviously since the user that is logged in under a Live account cannot logout, my api needs to detect if the current user is using a live account so I can prevent calling the logout() method.</p>
  
  <p><strong>so....My question is, how do I know which account type the user has signed in with in Windows 8?</strong></p>