What security permissions are required to allow TeamCity to connect to Team Foundation Server 2015?

I have been running into the following error when clicking the Test Connection button on the Edit VCS root page (does not matter which project I am in). This is an excerpt from the teamcity-tfs log file:

Running under .NET Framework 4.0.30319.34014
INFO  - Use Team Explorer 2012
TFS Native Accessor v10.0 Copyright (C) 2006-2015 JetBrains s.r.o.
INFO  - Connecting to server http://**********:8080/tfs/TimeTrak
INFO  - WebProxy is disabled
Connection test:
  Root='$/Production/Web Portals/TimeTrak 2015'
ERROR - Invalid server path: $/Production/Web Portals/TimeTrak 2015
INFO  - System.ArgumentException: Invalid server path: $/Production/Web Portals/TimeTrak 2015
   at JetBrains.TeamCity.Tfs.Command_ConnectionTest.DoWithTfs(VersionControlServer vcs) in c:\BuildAgent\work\f567c3e9d85b8d7f\TfsNativeAccessor\src\Command_ConnectionTest.cs:line 18
   at JetBrains.TeamCity.Tfs.Command.<Do>b__0(TfsTeamProjectCollection tfs) in c:\BuildAgent\work\f567c3e9d85b8d7f\TfsNativeAccessor\src\Command.cs:line 39
   at JetBrains.TeamCity.Tfs.TfsLoginBase`1.DoWithAuthenticatedConnection(String server, String username, String password, JBAction`1 action) in c:\BuildAgent\work\f567c3e9d85b8d7f\TfsNativeAccessor\src\TfsLogin.cs:line 50
   at JetBrains.TeamCity.Tfs.Command.Do() in c:\BuildAgent\work\f567c3e9d85b8d7f\TfsNativeAccessor\src\Command.cs:line 27
   at JetBrains.TeamCity.Tfs.Program.Main(String[] args) in c:\BuildAgent\work\f567c3e9d85b8d7f\TfsNativeAccessor\src\Program.cs:line 550
stderr: Invalid server path: $/Production/Web Portals/TimeTrak 2015
[2015-09-16 12:06:13,060]  ERROR - ers.vcs.tfs.TfsNativeExeRunner - tfs error "tfs" {instance id=73, parent internal id=-1, parent id=dummy_tfs, description: "tfs: http://**********:8080/tfs/TimeTrak $/Production/Web Portals/TimeTrak 2015"}: Invalid server path: $/Production/Web Portals/TimeTrak 2015
[2015-09-16 12:07:18,145]   INFO - vcs.tfs.SimpleTfsProcessRunner - TFS command finished. command: C:\TeamCity\webapps\ROOT\WEB-INF\plugins\tfs\bin\tfs-native.exe @@C:\TeamCity\temp\TC-TFS-90-9638_81\command.params, in file: {http://devserver-new:8080/tfs/TimeTrak, /hash:S, /noProxy, C:\TeamCity\temp\TC-TFS-90-9638_76.result, GetCurrentVersion}, completed in: 0 second(s)
stdout: TFS Native Verifier v10.0 Copyright (C) 2006-2015 JetBrains s.r.o.

Additional Info:

  • I am running the TeamCity Server service, and the TeamCity Build Agent service as a domain user
  • I am running TFS services using the same user account as the previous bullet point
  • I am running Team Foundation Server 2015 on-site (I replaced the server name in the log excerpt above with *)
  • The test connection WILL work if I provide our Domain Administrator credentials in the Username and Password fields on the Edit VCS Root page.
  • A test connection WILL work if I provide my own domain credentials.

Obviously, we would prefer to not have to specify credentials this way so we don't have to worry about keeping passwords up to date. So, considering all of the above, here's my question:
What security permissions are required in order to let Team City connect to our TFS 2015  server?


1 comment
Comment actions Permalink

Hi Andrew,

You can leave UserName field blank to let TFS select a user account that is used to run the TeamCity Server (or Agent for the agent-side checkout). Please double check that the user that TeamCity server/agent is running under has appropriate permissions to see the project.
If everything is configured correctly but you still cannot connect to TFS server, then please enable debug-vcs logging preset on Administration > Diagnostics page, reproduce the issue and attach resulting teamcity-vcs.log file.


Please sign in to leave a comment.