Permission error while trying to programmatically connect to TFS 2010

I am trying to connect to TFS 2010 through the .Net class Microsoft.TeamFoundation.Client.TeamFoundationServer(in this case, through powershell).

I pass the constructor arguments to the same URL that I connect to through visual studio, and my Active Directory credentials obtained with Security.Principal.WindowsIdentity.GetCurrent(). However, when I call the method Authenticate(), I get the following error (sub DOMAIN and USERNAME for my credentials).

An exam calling "Authentication" with Argument "0": "TF50309: The following account does not have sufficient permissions to complete the operation: (DOMAIN) \ (USERNAME). The following permissions are required: Perform the following operation: View information about the collection level."

So, yes, I can fix the error of our system administrator for all this permission, but I have no idea why I need it; in the end, I can connect to TFS just fine through visual studio or through the web interface (by url suffix using "/ web"), and what gives? What am I missing, that I cannot authenticate programmatically?

Additional tip: We also have a TFS2008 server - after the same process, which I could check for it without problems

+3
source share
1 answer

Make sure you include the project collection in your connection URI (e.g. http://tfs:8080/DefaultCollection

+4
source

Source: https://habr.com/ru/post/1780908/


All Articles