Allowing Azure DevOps Release Pipelines Access to Remote Artifacts

If you’re using Azure DevOps for your continuous integration/continuous deployment (CI/CD) pipelines you may have stumbled across a pretty cool feature: you can create a build pipeline artifact in one project and import it into the release pipeline of another project! I use this to build a utility once and then import it into several other projects to avoid having to build it several times and trying to maintain settings in multiple places.

The issue is that the first time I tried using this approach, I received the following error:

2022-05-31T06:42:42.2517765Z ##[section]Starting: Download artifact - _Utility App - Utility App
2022-05-31T06:42:42.3632226Z ==============================================================================
2022-05-31T06:42:42.3632956Z Task         : Download build artifacts
2022-05-31T06:42:42.3633439Z Description  : Download files that were saved as artifacts of a completed build
2022-05-31T06:42:42.3633715Z Version      : 0.200.1
2022-05-31T06:42:42.3634068Z Author       : Microsoft Corporation
2022-05-31T06:42:42.3634549Z Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/download-build-artifacts
2022-05-31T06:42:42.3634953Z ==============================================================================
2022-05-31T06:42:49.0078464Z Error: in getBuild, so retrying => retries pending  : 4
2022-05-31T06:43:34.1171511Z Error: in getBuild, so retrying => retries pending  : 3
2022-05-31T06:45:49.4315894Z Error: in getBuild, so retrying => retries pending  : 2
2022-05-31T06:51:49.7774413Z Error: in getBuild, so retrying => retries pending  : 1
2022-05-31T06:57:49.9960407Z ##[error]Failed in getBuild with error: Error: VS800075: The project with id 'vstfs:///Classification/TeamProject/{GUID}' does not exist, or you do not have permission to access it.
2022-05-31T06:57:50.0533271Z ##[error]Error: VS800075: The project with id 'vstfs:///Classification/TeamProject/{GUID}' does not exist, or you do not have permission to access it.
2022-05-31T06:57:50.0572339Z ##[section]Finishing: Download artifact - _Utility App - Utility App

I couldn’t find a clear answer for how to fix it but managed to get there with some trial and error!

The Fix

  1. Open the project that you want to pull the artifact into (that is, if you’re trying to get the artifact that is built in Project A to be used as part of a release pipeline for Project B you need to open Project B at this step). The URL may look similar to https://dev.azure.com/OrganisationName/ProjectName, but could look a little different if it’s an older project
  2. In the lower left of the screen click on “Project Settings”
A screenshot of the Azure DevOps project summary screen with the "Project settings" navigation item highlighted
  1. Under the “Pipelines” heading, click “Settings”
  2. Under the “General” section, ensure that “Limit job authorization scope to current project for release pipelines” is unchecked (if you cannot edit the setting due to permissions, see below for steps to make this editable per project)
A screenshot of the Azure DevOps project settings screen, where the "Pipelines -> Settings" navigation item and the option "Limit job authorization scope to current project for release pipelines" are both highlighted

Potential Pitfalls

“This setting cannot be changed as it is enforced at the organization level”

If you see the above message, the following steps will allow for the setting to be configured on each project:

  1. Go to your organisation page (which may look similar to https://dev.azure.com/OrganisationName)
  2. In the lower left of the screen click on “Organisation Settings”
  3. Under the “Pipelines” heading, click “Settings”
  4. Under the “General” section, ensure that “Limit job authorization scope to current project for release pipelines” is unchecked
  5. Go back to the steps above and repeat for the project you want to pull the artifact into

Can’t Uncheck Option

If you are clicking on the option and it isn’t becoming unchecked you may not have sufficient permissions; I was able to change the option on a project that I am Project Administrator for but on a different project I was unable to make the change!

The fix for this is to either be granted more permissions or to find someone that has sufficient permissions to make the change and ask them to do it.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.