title: Visual Studio Online TF30063: You are not authorized to access
body: <p>I am trying to connect to my Visual Studio Online account, via web api. Following the steps here for here:</p>
  
  <p><a href="http://blogs.msdn.com/b/buckh/archive/2013/01/07/how-to-connect-to-tf-service-without-a-prompt-for-liveid-credentials.aspx">http://blogs.msdn.com/b/buckh/archive/2013/01/07/how-to-connect-to-tf-service-without-a-prompt-for-liveid-credentials.aspx</a></p>
  
  <pre><code>NetworkCredential netCred = new NetworkCredential(
      "myaccount@gmail.com",
      "mypassword");
  BasicAuthCredential basicCred = new BasicAuthCredential(netCred);
  TfsClientCredentials tfsCred = new TfsClientCredentials(basicCred);
  tfsCred.AllowInteractive = false;
  
  TfsTeamProjectCollection tpc = new TfsTeamProjectCollection(
      new Uri("https://myaccount.visualstudio.com/DefaultCollection"),
      tfsCred);
  
  tpc.EnsureAuthenticated();
  Console.WriteLine(tpc.InstanceId);
  </code></pre>
  
  <p>However I get the following error message:  </p>
  
  <blockquote>
    <p>TF30063: You are not authorized to access .visualstudio.com</p>
  </blockquote>