I used https://analytics.dev.azure.com/{orgname}/{ProjectName}/_odata/v2.0/WorkItemSnapshot REST API to fetch the active bug counts for past 60 days for the project in Azure devops. On using the custom scoped PAT to invoke the above API it threw unauthorized exception. Could you please tell me what permissions do I need to grant for PAT to access the workItemssnapshot API.
Asked
Active
Viewed 168 times
0
-
Hi @VeenaKP, How are things going? Have you checked with the suggestion in my answer? Is it helpful to you? Please try it, and any progress, feel free to tell me. – Bright Ran-MSFT Dec 28 '20 at 08:38
1 Answers
0
To use OData API to query work items in a project, you should have the following permissions at least:
- On organization, your access level should be
Basic
.
- In project, you should be a member of the project, and at least have Readers permissions. Make sure the permission
View analytics
isAllow
for you.
- For your personal access token (PAT), it should have the scopes
Analytics(Read)
andWork Items(Read)
.

Bright Ran-MSFT
- 5,190
- 1
- 5
- 12