Create Personal Access Token (PAT) in Azure DevOps.

Recently, my task at work was to automate the progress of Work Items in the Azure DevOps Board. To accomplish this task, an alternate password to authenticate into Azure DevOps is required. Below are the steps to successfully create Personal Access Token (PAT) in Azure DevOps. Happy Learning!

  • Sign in to your organization (https://dev.azure.com/{yourorganizationname}).
  • From the Azure DevOps home page, open user settings and select Personal Access tokens. See the screenshot below:
Figure 1: Screenshot select Personal access tokens
  • Select + New Token. See the screenshot below:
Figure 2: Screenshot to click “New Token”

If no token has been created before, the screenshot below will be shown:

Figure 3: Screenshot to click “New Token” if no token has been created.
  • Give your token a name, choose the organization where the token will be used, and then set the token to automatically expire after a set number of days. The default value is 30 days. See the screenshot below:
Figure 4: Screenshot – Give token desired name.
  • The next step is to select the scope for the token to authorize for the specific task. In this case, the token is to read and write work items, the token scope will be limited to Work Items (Read & write). After selecting Read & write under Work Items, select Create. See the screenshot below:
Figure 5: Screenshot to click “Create” after specifying scope to specific task
  • Copy the token, keep it in a safe place and keep it a secret. Pay attention to the warning in the screenshot below:
Figure 6: Screenshot to copy created token and keep in a safe place.
  • After the token has been successfully created, a summary notification will be sent to the email connected to your Azure DevOps account. See the screenshot below:
Figure 7: Screenshot showing summary of token sent to associated email.

Leave a Comment

Your email address will not be published.