Personal Access Token - Azure DevOps

Using PAT to connect Azure DevOps with other tools

Personal Access Token - Azure DevOps

What is PAT

Personal Access Token(PAT) is a replacement for your Password. You can use your PAT instead of your password to give access to various application, tools etc.

PAT's are as important as your passwords and should never be shared without proper permissions and access to it.

What can you use it for?

  • Let's say you want to host your own Azure DevOps Agent, for the agent to authenticate itself with Azure DevOps you can use a PAT.
  • You want an external application to connect to Azure DevOps and get some info about the build etc, you can grant them read only permission and give a PAT.

Create a PAT

Go to Azure DevOps and click user settings, then click Personal Access Token

PAT_token_01_createPAT.png

Click New Token

PAT_token_02_NamePAT.png

  1. Give it a name

  2. Expiration Date lets you decide how long this PAT should be active, you can change it later too.

  3. Scopes lets you decide what type of actions can be done using your PAT.

  4. Click create to create a PAT.

Once you create a Token you get your PAT, this token will be visible only once. You cannot get it again, so make sure you keep it safe.

PAT_token_03_Success.png

Edit PAT

You can modify your PAT without having to create a new one, change permissions or extend expiration date. You still wont be able to see the previously generated token.

PAT_token_04_EditPAT.png

Revoke PAT

If you are no longer using a PAT or don't want it to be active you can Revoke it(disable).

Once revoked, the application using the PAT will no longer have access to your Azure DevOps Organization.

PAT_token_05_RevokePAT.png

Thank you for reading, you can find me on Twitter, read my blogs on Hashnode and Medium