3
C:\hostedtoolcache\windows\dotnet\sdk\3.1.416\NuGet.targets(128,5): 
 error :   
   Response status code does not indicate success: 403 
     (Forbidden - User '2016d1a0-0d43-42b0-8a96-7f6a9bxxxxxx' lacks permission to complete this action. You need to have 'ReadPackages'. 
     (DevOps Activity ID: ADACCF88-4190-491C-B690-E3330E3xxxxx)). 
   [D:\a\1\s\Notifications.Functions\Notifications.Application.csproj]
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:08.96


##[error]Error: The process 'C:\hostedtoolcache\windows\dotnet\dotnet.exe' failed with exit code 1
ouflak
  • 2,458
  • 10
  • 44
  • 49
  • 1
    **Solved:** projectname / Settings / Pipeline Settings. **Disable:** Limit job authorization scope to current project for non-release pipelines Limit job authorization scope to current project for release pipelines Publish metadata from pipelines (preview) – Alexandre Monteiro Silva Guima Feb 28 '22 at 18:16

2 Answers2

5

This error message appears if the build service doesn't have permission to access your Azure Artifacts feed. To fix this:

  1. Go to your Azure Artifacts page.
  2. Select the Feed Settings button, then select the Permissions tab.
  3. Select Add users/groups.
  4. In the User/Group box, type [ProjectName] Build Service (where [ProjectName] is the name of the Azure DevOps project containing the pipeline you're trying to push from) and select the corresponding group that appears in the dropdown.
  5. Set the Role to Contributor. Then select Save.

Now when you run the pipeline, it will be able to push nuget packages to the Azure Artifacts feed without issue.

Craig Brown
  • 1,891
  • 1
  • 24
  • 25
1

Check feed have "Contributor" permission to "Build Service", usually it is "Collaborator" if it was already added by Azure.