Getting a '403 Forbidden' when calling the Pull Request API on VSTS

旧街凉风 提交于 2019-12-20 06:16:16

问题


For other APIs that I'm calling (including Analytics), it all seems to work fine, but when I try to make any Pull Request queries, I get a 403 Forbidden.

The calls are being made by my private Windows agent with PAT authorised with all scopes. It is using @{Authorization = "Bearer $env:SYSTEM_ACCESSTOKEN"}.

Is there some other permission I need to set somewhere?

Edit 1:

If I use $header = @{Authorization = "Basic <hard coded base64 encoded string used in the header for my Postman queries>"}, it works.


回答1:


You need to grant Contribute to pull requests permission to Project Collection Build Service (XXX) user. (Version control admin page > Select a repository)



来源:https://stackoverflow.com/questions/49020015/getting-a-403-forbidden-when-calling-the-pull-request-api-on-vsts

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!