Can anybody explain me how to get this working?
I have a pipeline which uses a job template and that uses a steps template.
I can set the variable
variables:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
or
variables:
system_accesstoken: $(System.AccessToken)
in the starting pipeline and in the steps template but it doesn't work.
(according to this question)
I keep getting:
[error]'Allow Scripts to Access OAuth Token' must be enabled.
If I set it through the visual designer and view the yaml or export the pipeline, I don't find any reference to setting 'Allow OAuth...'
.
This is also not helpful for a yaml based pipeline...
This is the task that needs the token:
- task: bool.fetch-build-artifact.fetch-build-artifact-task.fetch-build-artifact@3
displayName: 'Fetch'
inputs:
project: '[omitted]'
buildDefinitionId: 159
artifactName: drop.develop
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)