For a specific build task I’m using inside Azure DevOps it was required to allow the build to access the OAuth token to interact with TFS/Azure DevOps. This option is disabled by default and it took me some time to figure out where I could enable it.
Here are the (easy once you know it) steps:
- Go to Pipelines –> Build.
- Select the build/release pipeline that you want to configure from the list and click on Edit in the right corner
- On the Edit Build Definition screen, click on the ‘Run on Agent’ section (in my case Agent Job 1)
- In the Properties, you find the ‘Allow scripts to access the OAuth token’ in the Additional options section