Forum Discussion
surendra-p
Dec 09, 2024Copper Contributor
How to fetch the user in azure devOps using API
I am using the azure board API. I want to know is there any API to fetch the user which is associated with the PAT token provided. Basically, want to verify if a valid user exists for associated PAT ...
Kidd_Ip
Dec 11, 2024MVP
Try this:
- Get the PAT details: Use the GET method to retrieve details about the PAT. This will help you verify if the PAT is valid.
GET https://dev.azure.com/{organization}/_apis/tokens/pats/{patId}?api-version=7.1-preview
- Check the response: The response will include details about the PAT, such as its validity and the associated user. If the PAT is valid, you will get the user information in the response.