Sign in to your organization (https://dev.azure.com/{Your_Organization}).
From your home page, open user settings and select Personal access tokens.
Select + New Token.
Name your token, select the organization as All accessible organizations , and then set your token to automatically expire after a set number of days.
Select the scopes for this token to authorize for your specific tasks. Note You might be restricted from creating full-scoped PATs. If so, your Azure DevOps Administrator in Microsoft Entra ID has enabled a policy that limits you to a specific custom-defined set of scopes. For more information, see Manage PATs with policies/Restrict creation of full-scoped PATs. For a custom-defined PAT, the required scope for accessing the Component Governance API, vso.governance, isn't selectable in the UI.
When you're done, copy the token and store it in a secure location. For your security, it doesn't display again.
Use your PAT anywhere your user credentials are required for authentication in Azure DevOps.