Search code examples
azure-devopsazure-devops-rest-apiauth-token

How to authorize into Azure API


I'm trying to send request into Azure Test API using the personal token I generated at ~/_usersSettings/tokens. I add "Authorization": "Bearer " header to my GET request, but it results in 401 response with an error "TF400813: Resource not available for anonymous access. Client authentication required. - Azure DevOps Server"

How do I do this properly?


Solution

  • If you are using Personal Access Token, it should be basic auth, not bear token auth.

    enter image description here

    After that, the request header will be like this:

    enter image description here