Connect to Azure DevOps via Personal Access Tokens

Completed

Personal Access Tokens or PATs are used within Azure DevOps to connect applications like Visual Studio Code or build agents to your Azure DevOps organization.

Azure DevOps uses Microsoft Accounts or organizational accounts within Microsoft Entra ID. But not all applications can work with this type of authentication. Therefore, you can create PATs, that have a maximum expiration date of one year. To create a PAT, you can open your user settings menu and select Personal access tokens. The user settings menu can be found in the right top corner, next to your profile picture.

Screenshot of the Personal access tokens setting.

On the Personal Access Tokens page, you can generate a new token. Each token is linked one or more scopes. A token can be generated for a build agent that will need some specific access to Azure DevOps Services, but another token can be generated for your Git client. This token does not need to have access to the build system in Azure DevOps.

When you generate a token, you can indicate to which organization this token is linked to or link it to all the organizations your account has access to. So, a token is linked to your Azure DevOps organization.

Screenshot of the create a new personal access token page.

Be aware, the token you create will only be shown once. Copy the token because you can't retrieve the token afterwards. You can always regenerate a new token.