tfx against Team Foundation Server (TFS) 2015 using Basic Authentication
In order to use
tfx against TFS on-premises, you will need to enable basic authentication in the tfs virtual application in IIS. This is a temporary solution until NTLM authentication is supported.
WARNING!! Basic authentication sends usernames and passwords in plaintext. You should consider configuring TFS to use SSL in order to enable secure communication when using basic auth.
Configuring TFS to use Basic Authentication
Follow these steps to enable basic auth for your TFS:
- Install the
Basic Authenticationfeature for IIS in Server Manager.
- Open IIS Manager and expand to the
Team Foundation Serverwebsite, and then click on the
tfsvirtual application. Double-click the
Authenticationtile in the Features view
- Click on
Basic Authenticationin the list of authentication methods. Click
Enablein the right hand column. You should now see
- Note: leave the
tfx login with Basic Authentication
Now you can start to use
tfx against your TFS server. You'll want to
login before issuing commands.
tfx login --auth-type basic
- You will be prompted to add your service Url.
- Note for TFS on-prem: If the server name is part of the service URL, be sure to specify the fully-qualitifed domain name (FQDN) of that server (i.e. in the form servername.domain.local). Otherwise, TFX will fail to connect.
- You will be prompted for your username. Use
domain\user(e.g. fabrikam\peter). If you are on a workgroup machine, use
- You will be prompted for your password. Enter the password for the username you entered.
You can now use any other
> tfx login --auth-type basic Copyright Microsoft Corporation Enter service url > http://localhost:8080/tfs/defaultcollection Enter username > fabfiber\peter Enter password > ******* logged in successfully