0

I wonder how I can revoke a PAT token in Azure DevOps which I know only the actual token value of.

The GUI lets me remove my own tokens as long as I know their name, and via API it seems to be possible to remove tokens if their identifier is known only (https://learn.microsoft.com/en-us/rest/api/azure/devops/tokenadmin/revocations/revoke%20authorizations?view=azure-devops-rest-5.1).

If only the token value is known, I would neither know the user it belongs to, nor its id.

hey
  • 2,643
  • 7
  • 29
  • 50

1 Answers1

1

I wonder how I can revoke a PAT token in Azure DevOps which I know only the actual token value of.

Azure DevOps doesn't support revoking PAT simply by its value.

With a value alone, Azure Devops has no way to determine which PAT the value belongs to. The name-and-value pairs can only be seen when creating PATs.

In Azure Devops, we can revoke PAT via web portal or REST API. And if you want to revoke a PAT by REST API, you need to know its "authorizationId".

If you have questions about how to get "authorizationId". Click this question for detailed information.

Note that when you use REST API to revoke PAT, you need to use OAuth2 authentication. Click this document for detailed information and methods.

Jane Ma-MSFT
  • 4,461
  • 1
  • 6
  • 12