When accessing Azure DevOps via REST API through PowerShell, the Personal Access Token (PAT) used for authentication needs Full access.
When the PAT is set to Custom defined access with every scope enabled, some requests fail:
Invoke-RestMethod : The remote server returned an error: (401) Unauthorized.
Why is Full access not equal to Custom defined access with every scope enabled and maximal permissions? Is it not possible to limit the PAT to the scopes actually concerned by the request?
Edit: The concerned REST API request:
GET https://dev.azure.com/{organization}/{project}/_apis/build/latest/{definition}?api-version=5.1-preview.1