This question already has an answer here:
- Connect TeamCity to Visual Studio Online 3 answers
I'm struggling trying to connect my TeamCity project to my TFS project. I tried a bunch of stuff, but I always get the same error:
TFS failed. ExitCode: 111, command: C:\TeamCity\webapps\ROOT\WEB-INF\plugins\tfs\bin\tfs-native.exe @@C:\TeamCity\temp\TC-TFS-25-7939_109\command.params, in file: {https://budiedimas.visualstudio.com/DefaultCollection/TesteTeamCity, /hash:S, /noProxy, C:\TeamCity\temp\TC-TFS-25-7939_108.result, ConnectionTest, $/TesteTeamCity/TesteTeamCity}, completed in: 1 second(s)
stdout: TFS Native Verifier v8.0 Copyright (C) 2006-2013 JetBrains s.r.o.
Running under .NET Framework 4.0.30319.18052
INFO -
INFO - Use Team Explorer 2012
INFO -
TFS Native Accessor v8.0 Copyright (C) 2006-2013 JetBrains s.r.o.
INFO - Connecting to server https://budiedimas.visualstudio.com/DefaultCollection/TesteTeamCity
INFO - WebProxy is disabled
Connection test:
Server='https://budiedimas.visualstudio.com/DefaultCollection/TesteTeamCity'
Root='$/TesteTeamCity/TesteTeamCity'
ERROR - TF30063: You are not authorized to access https://budiedimas.visualstudio.com/DefaultCollection/TesteTeamCity.
System.Exception: TF30063: You are not authorized to access https://budiedimas.visualstudio.com/DefaultCollection/TesteTeamCity. ---> Microsoft.TeamFoundation.TeamFoundationServerUnauthorizedException: TF30063: You are not authorized to access https://budiedimas.visualstudio.com/DefaultCollection/TesteTeamCity.
em Microsoft.TeamFoundation.Client.Channels.TfsHttpWebRequest.EnsureTokenProvider(HttpWebResponse webResponse)
em Microsoft.TeamFoundation.Client.Channels.TfsHttpWebRequest.SendRequest()
em Microsoft.TeamFoundation.Client.Channels.TfsHttpRequestChannel.Request(TfsMessage message, TimeSpan timeout)
em Microsoft.TeamFoundation.Client.Channels.TfsHttpClientBase.Invoke(TfsClientOperation operation, Object[] parameters, TimeSpan timeout, Object[]& outputs)
em Microsoft.TeamFoundation.Framework.Client.Registration.GetRegistrationEntries(String toolId)
em Microsoft.TeamFoundation.Framework.Client.RegistrationProxy.GetRegistrationEntries(String toolId)
em Microsoft.TeamFoundation.Framework.Client.RegistrationService.GetInstanceId()
em Microsoft.TeamFoundation.Framework.Client.RegistrationService.get_InstanceClientCacheDirectory()
em Microsoft.TeamFoundation.Framework.Client.RegistrationService..ctor(TfsTeamProjectCollection tfsObject)
em Microsoft.TeamFoundation.Client.TfsTeamProjectCollection.CreateServiceProxy(Type serviceType)
em Microsoft.TeamFoundation.Client.TfsTeamProjectCollection.GetServiceInstance(Type serviceType, Object serviceInstance)
em Microsoft.TeamFoundation.Client.TfsConnection.GetService(Type serviceType)
em Microsoft.TeamFoundation.Framework.Client.PreFrameworkServerDataProvider.FindServiceLocation(String serviceType, String toolId)
em Microsoft.TeamFoundation.Framework.Client.PreFrameworkServerDataProvider.LocationForCurrentConnection(String serviceType, Guid serviceIdentifier)
em Microsoft.TeamFoundation.Client.TfsConnection.EnsureProviderConnected()
em JetBrains.TeamCity.Tfs.Command.Do() na c:\BuildAgent\work\23f504c63c17dfdf\TfsNativeAccessor\src\Command.cs:linha 28
em JetBrains.TeamCity.Tfs.Program.Main(String[] args) na c:\BuildAgent\work\23f504c63c17dfdf\TfsNativeAccessor\src\Program.cs:linha 134
--- Fim do rastreamento de pilha de exce‡äes internas ---
em JetBrains.TeamCity.Tfs.Program.Main(String[] args) na c:\BuildAgent\work\23f504c63c17dfdf\TfsNativeAccessor\src\Program.cs:linha 438
I always get the error:
'You are not authorized to access /DefaultCollection/'
I have admin rights in everything on the TFS and I don't know if I'm missing some authorizantion configuration on the TeamCity.
Does anyone have any idea why this is happening?