I've written a simple AzureCLI script which should update a variable group value for a project. I've tested the script locally and this workds find so I know its an ADO issue, this script is:
echo $Pat_key| az devops login
az devops configure -d organization=https://dev.azure.com/****/ project=***
az pipelines variable-group variable update --id 365 --name release.version --value **-Release-1.2.0
I've tried a few differnt flavours, either running in powershell or adding the PAT token manually or not at all and either get AzureCLI just hanging and not progressing the task. If I get an error message, this is what I get:
ERROR: TF400813: The user 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa' is not authorized to access this resource.
Any help would be amazing. Thanks again!
The user 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa' is not authorized to access this resource.
The error shows that the user accessing the resources with anonymous access.
I hope you are logged in with az devops login
only once when running the pipeline. If not avoid multiple logins.
echo $Pat_key| az devops login
Having the same issue since last couple of weeks:/ Locally this works, it doesn't work only via azure pipelines. So I can tell its not a permission issue nor I don't have to reset my PAT.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.