0

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.

VeenaKP
  • 3
  • 1
  • 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 Answers1

0

To use OData API to query work items in a project, you should have the following permissions at least:

  1. On organization, your access level should be Basic.

enter image description here

  1. In project, you should be a member of the project, and at least have Readers permissions. Make sure the permission View analytics is Allow for you.

enter image description here

  1. For your personal access token (PAT), it should have the scopes Analytics(Read) and Work Items(Read).

enter image description here

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