I am trying to connect to my Visual Studio Online account, via web api. Following the steps here for here:
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);
However I get the following error message:
TF30063: You are not authorized to access .visualstudio.com