TFS/VSTS authentication options

SpecSync supports several authentication options for the supported TFS/VSTS systems. This section provides a summary of how the different authentication options have to be configured:

For Visual Studio Team Services (VSTS)

For on premises Team Foundation Server

In all options below, you can use environment variables for specifying user name and password (%variable% format), to make the testing easier without checking-in passwords to the source control.

specsync4mtm.cmd ... --user "%%VSO_USER%%" --password "%%VSO_PWD%%"

(From shell scripts you have to use %% to avoid resolving the variable by the script itself.)

VSTS - Personal access tokens

The recommended way to access your VSTS project for synchronization is to use personal access tokens. Personal access tokens are like passwords that are valid for a certain time only and can have restricted access to your VSTS resources.

To create a personal access token, you have to follow the following steps:

  1. Navigate to your VSTS account (e.g. https://myaccount.visualstudio.com) with a browser.
  2. On the upper right corner, click on your name and select "My Profile".
  3. Switch to the security tab and make sure that the "Personal access tokens" option is selected.
  4. Click on "Add" to create a new personal access token for synchronization.
  5. Specify a description (e.g. "SpecSync"), select an expiration and select "All scopes" as authorized scopes (we will refine the necessary scopes in further versions).
  6. Click on "Create Token" and save the generated token.

Once you have created your token, you can use the synchronization with your VSTS login name (email address) and the generated token.

specsync4mtm.cmd --tfsUrl https://myaccount.visualstudio.com/MyProject --user [email protected] --password jmmik...u3rxencn4god7a

(If you don't specify the --password option, the tool will prompt you for entering the password.)

VSTS - Alternate authentication credentials

A slightly less secure alternative of personal access tokens is to use alternate authentication credentials with VSTS. With this option, you can provide a username/password pair that can be used for password-based authentication.

To enable alternate authentication credentials, you have to follow the following steps:

  1. Navigate to your VSTS account (e.g. https://myaccount.visualstudio.com) with a browser.
  2. On the upper right corner, click on your name and select "My Profile".
  3. Switch to the security tab.
  4. Select the "Alternate authentication credentials" option.
  5. Check the "Enable alternate authentication credentials" checkbox and specify a (secondary) user name and password.
  6. Click on "Save".

Once you have enabled alternate authentication credentials, you can use the synchronization with the secondary user name and password. This user name and password is not the same as the user name (email) and password you specify to login to VSTS with your browser!

specsync4mtm.cmd --tfsUrl https://myaccount.visualstudio.com/MyProject --user myalternateusername --password myalternatepassword.

(If you don't specify the --password option, the tool will prompt you for entering the password.)

VSTS - Visual Studio sign-in prompt

For interactive sessions you can also provide your VSTS credentials using the Visual Studio sign-in prompt (similar to what you get when providing your credentials for Visual Studio).

To authenticate using the sign-in prompt, you should not omit the --user option:

specsync4mtm.cmd --tfsUrl https://myaccount.visualstudio.com/MyProject

In the popup window you have to provide the user name (email) and the password you usually use for accessing VSTS with the browser.

TFS - Domain user name and password

For installed Team Foundation Servers, you can use your domain user name (MYDOMAIN\myuser format) and password for the synchronization.

specsync4mtm.cmd --tfsUrl http://mytfs:8080/tfs/DefaultCollection/MyProject --user MYDOMAIN\myuser --password mydomainpassword.

(If you don't specify the --password option, the tool will prompt you for entering the password.)

TFS - Windows sign-in prompt

For installed Team Foundation Servers, if you omit the --user option, you can provide your credentials in an interactive sign-in prompt.

specsync4mtm.cmd --tfsUrl http://mytfs:8080/tfs/DefaultCollection/MyProject

results matching ""

    No results matching ""