Granting Read Privileges to Azure Artifact Feed

David Maryo 101 Reputation points

How to provide permissions to this USER to access the Packages from Azure Artifact Feed? We have tried checking on the backend to see what that UserID is referring to but unfortunately, I can't find any user with that User ID in our Azure Active Directory? Would like to get some expert advise on this.

{"message":"User '4a2eb786-540d-4690-a12b-4badf25ea6e0' lacks permission to complete this action. You need to have 'ReadPackages'.","typeName":"Microsoft.VisualStudio.Services.Feed.WebApi.FeedNeedsPermissionsException, Microsoft.VisualStudio.Services.Feed.WebApi, Version=, Culture=neutral, PublicKeyToken=
Microsoft Entra
{count} vote

2 answers

Sort by: Most helpful
  1. Arkadiusz Kozieł 41 Reputation points

    I had similar issue.
    I granted Contributor for 2 users:
    Project Collection Build Service (<YOUR-ORG-NAME>)

    I was also NOT able to findout what is the user name based on error:

    [warning]User 'd909a33e-1349-4057-99ea-5d1742b38c3a' lacks permission to complete this action. You need to have 'ReadPackages'.

    You can see this on attachement
    This solved my issue.

    7 people found this answer helpful.

  2. Marilee Turscak-MSFT 33,801 Reputation points Microsoft Employee

    Hi @David Maryo ,

    I understand that you are trying to grant "Read" permissions to a particular user to allow that user to access the Azure Artifact Feed. I understand that you are also hoping to figure out how to locate the user by User ID.

    In order to grant Read permissions to Azure Artifacts for the user, you need to go to Artifacts > Permissions > Add users/groups > Add the user and select the Access role:


    To figure out which user has that particular Object ID, you can use the Get-AzureADObjectByObjectId Powershell command.

       -ObjectIds <System.Collections.Generic.List`1[System.String]>  
       [-Types <System.Collections.Generic.List`1[System.String]>]  

    You can also use Microsoft Graph API:

    Content-type: application/json  

    If you want to call the Microsoft Graph with Azure CLI, you can use the command az rest

    **az rest --method POST --url '' --headers 'Content-Type=application/json'  --body '{"ids":[""]}'**  

    Let me know if this helps and if you have further questions.