Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio Online TF30063: You are not authorized to access

I am trying to connect to my Visual Studio Online account, via web api. Following the steps here for here:

http://blogs.msdn.com/b/buckh/archive/2013/01/07/how-to-connect-to-tf-service-without-a-prompt-for-liveid-credentials.aspx

NetworkCredential netCred = new NetworkCredential(
    "[email protected]",
    "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

like image 604
Rajat banerjee Avatar asked Mar 05 '14 11:03

Rajat banerjee


People also ask

How do I fix error TF30063?

So, for this you can clear the TFS cache and reconnect the TFS. You can clear TFS's cache from following location, just change the user name as per your system. Once cache will delete, probably TFS will ask for credential to reconnect. You need to provide valid credentials and TFS will work.


1 Answers

After trying every coding option in the book, I turned to an alternative approach:

Logged out of Visual Studio Online from:

  • Browser(s)
  • Browser within Visual Studio IDE
  • Cleared my cache from C:\Users\ [your username] \AppData\Local\Microsoft\Team Foundation\5.0\Cache

and it worked...:)

like image 174
Rajat banerjee Avatar answered Oct 20 '22 06:10

Rajat banerjee