This project is read-only.


Hosted TFS issues


I have my TFS hosted on and I cannot seem to get the plugin working for this.
I just get:
You are not authorized to access\DefaultCollection

Does not really matter how I try to enter the credentials and alternate credentials don't work either.
It's not an authorization issue with the account since the TFS VCS integration works just fine with that account (I have to use the ##LIVE##\ prefix to the username as stated).
So I can only assume that this is something that has been missed?

Would be thankful for any response.
Closed Nov 12, 2013 at 9:49 AM by simone_b


simone_b wrote Nov 7, 2013 at 5:00 PM

I'm using a local instance of TeamCity pointing at my account on and it works by using my live credentials, i.e. my email as the username and my live password as the password. Have you tried that?

HenrikPoulsen wrote Nov 9, 2013 at 1:26 PM

What the equates to in my case would be the following:

Server URL:
Username: Password: myLivePassword

And this does not work. (You are not authorized)

myTfsDomain and myDomain are not the same.
And as I mentioned it does work with the default TFS VCS integration plugin.

Any ideas?

simone_b wrote Nov 11, 2013 at 9:43 AM

I'm gonna have a look shortly, I'll let you know.

HenrikPoulsen wrote Nov 11, 2013 at 11:22 AM

Extremely weird.
I took a look at the unit tests and saw that in your tests you were using the ##LIVE##\ prefix as well, which I hadn't done. So I tried that but it still didnt work.
Then I downloaded the source code and compiled TfsWrapper.exe then ran it, on my local machine, with the exact commandline that TeamCity used and it worked fine.

Then I copied the compiled tfswrapper.exe over to the build machine and tried the same thing, which worked.
Then I went back into TeamCity and clicked "Test Connection" and it worked. I changed no settings at all and suddenly it started working.
So for some reason I had to run the tfswrapper.exe manually on the build machine and it started working in TeamCity. Very odd >_>

Any ideas why this might happen?

simone_b wrote Nov 11, 2013 at 11:48 AM

Which binary of the plugin do you have? Have you downloaded the latest version from the build server?

HenrikPoulsen wrote Nov 11, 2013 at 12:27 PM

The one running on the build server was downloaded last week. So it should be latest.
Now an hour later it has stopped working again. So I guess the successful login when running it manually is temporarily stored in a session somewhere which makes it possible for TeamCity to access it.

simone_b wrote Nov 11, 2013 at 1:18 PM

Ok, I'll have a look sometime today, just to be sure try installing the latest version again. I presume it's something weird going on with the TFS API.

HenrikPoulsen wrote Nov 11, 2013 at 1:51 PM

I double checked and it is from October 25th, which is the newest one from your build machine.
I also tested the precompiled tfswrapper from your build server on the build machine manually (in case there would be something with dlls etc) but it worked just fine.

The build machine is running Windows 8, if that matters :)

simone_b wrote Nov 11, 2013 at 10:24 PM

Hi Henrik, I pushed some changes to how the plugin tries to authenticate to TFS, after looking up a MSDN blog post about the topic.

To me it now works by using as the username either my live email or the alternate credentials username and as the password the alternate credentials password.

Try out the latest version on the build server and let me know how it works out for you.

HenrikPoulsen wrote Nov 12, 2013 at 9:15 AM

Seems to work now with the latest version. :)

simone_b wrote Nov 12, 2013 at 9:48 AM

Cool, glad it worked.