Reputation: 3
I'm creating projects for azure devops with my web app and I'm having an issue with setting the project avatar. It works fine if I give the PAT full access but of course I would prefer not to have to do that but instead give the least scopes necessary. But I don't know which ones that are and every time I try it I get an 'Unauthorized' error.
This is the Microsoft documentation for setting the avatar: https://learn.microsoft.com/en-us/rest/api/azure/devops/core/avatar/set%20project%20avatar?view=azure-devops-rest-6.0
Could anyone tell me which scopes I need for setting the project avatar?
Upvotes: 0
Views: 244
Reputation: 3058
which scopes I need for setting the project avatar?
Based on my test , you could grant the Token Administration(Read & manage) or Tokens(Read & manage) permission to the PAT.
Then the Rest API could work fine.
Upvotes: 2
Reputation: 6157
The different scopes and their description are available in the Authenticate with OAuth 2.0 documentation page (The same scopes are applicable for PAT tokens).
Sounds like the Scope you need is vso.profile_write
, i.e User Profile Write
Grants the ability to write to your profile.
Upvotes: 0