How to Extend a Personal Access Token for Azure DevOps

Personal Access Tokens (PAT) for Azure DevOps have an expiration date. They can be valid for a year at most. If this expiration date comes closer, Azure DevOps sends you an email with this subject:

Azure DevOps personal access token nearing expiration

We use PAT to allow our build servers to access our code in Azure DevOps. I can imagine more pleasant things than replacing the access tokens of all our agents. But fortunately for me, there is a better solution: PATs can be extended!

Open your Azure DevOps project. Next to your profile picture in the top right corner is the icon for user settings (1). From there you can access your Personal Access Tokens (2):

Go to user settings / Personal access tokens

Select the PAT you want to change (1) and then click on the Edit button that appears on the top of the list (2):

Select your token and click on edit

You are now on the same form as you are when you create a new PAT. You can extend the expiration date for another year by choosing a new date it in the calendar:

Choose a new expiration date

Save your changes and your PAT is valid for another year. This is a lot less work than trying to change all your build agents.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.