Search code examples
azureazure-devopsazure-clidatabricks-cli

Azure DevOps download universal package error - TF400813: The user is not authorized to access this resource


I want to create a Databricks CLI artifact in Azure DevOps for a pipeline. I'm trying to download the Databricks CLI as a Universal Package artifact via the Azure DevOps CLI, but I am getting the following error:

An error occurred on the service. TF400813: The user '974033c9-c152-7t28-249a-4071sca9jf8n' is not authorized to access this resource.

I am the owner, I have tried creating different projects, creating different personal access tokens with full access, and as far as I can tell, I have all the permissions. I've also tried it on a different computer as I saw that one person resolved the issue that way. I've tried logging in with a pat on Mac, as well as regular 'az login' on Windows but I get the same error every time.

Other answers suggest checking the permissions are all set. Here are my permissions on the feed:

enter image description here

Does anyone know how to resolve this issue?


Solution

  • Even I received the same error code as yours, Then I added one Azure AD user and assigned it below permissions at the Organization level and added it as Owner in the Artifacts > Feeds > Settings > Permissions:-

    enter image description here

    enter image description here

    Then I logged in with the above account via Azure CLI command to publish and download the Databricks CLI as Artifact, Refer below:-

    az login
    
    az artifacts universal publish --organization https://dev.azure.com/sidxxxxx/ --feed sid2xxxx --name my-first-package --version 0.0.1 --description "Welcome to Universal Packages" --path C:\Users\v-sidesai\databricks_cli_0.211.0_windows_amd64.zip
    
    az artifacts universal download --organization "https://dev.azure.com/xxxxx/" --feed "sidxxxx" --name "my-first-package" --version "0.0.1" --path .
    

    Output:-

    enter image description here

    enter image description here

    enter image description here

    Reference:-

    Publish and download universal packages in Azure Artifacts - Azure Artifacts | Microsoft Learn

    Refer my SO answer