Monday, May 24, 2021

Azure DevOps: Granting Permission to a Pipeline to Consume an Azure Artifacts Project Scoped Feed in a Different Project

I have recently faced this npm ERR! 404 Not Found when trying to do an npm install. In this scenario, I was trying to access an Azure Artifacts Project Scoped Feed from a Pipeline that is running in a Different Project.

After some time of struggling, figured out it was a permission issue. What we need to do is, following two things.

  1. First, in the Project where the Project Scoped Feed lives in, we need to go to Project Settings -> Permissions. And then add the Pipelines Build Service to Contributors Group. Pipelines Build Service is something like "{ProjectName} Build Service ({OrganizationName})"
    Project Settings -> Permissions -> Contributors
  2. Then in Project Scoped Feed Settings, under Permissions, we need to grant Pipelines Build Service at least Collaborator access, so packages can be ingested from whatever the upstream sources the feed is setup with. If you only give read permissions, packages cannot be ingested from upstream sources.
    Feed Permission

And this should be it.

Hope that helps.

Happy Coding.

Regards,
Jaliya

No comments:

Post a Comment