Using Tokens from an Azure Container Registry to Call the /_tags Endpoint

Justin Williams 5 Reputation points

I have generated an access token for my Azure Container Registry (ACR) using the Token Menu. I would like to use this access token to call the /_tags endpoint for a specific image in the registry, but I am not sure how to do this.

I can use the token to login using the docker login command in powershell, but the only way I've been able to get the api call to work is by using the admin account credentials.

I thought maybe the "Action" was a clue so I created a custom scope map for the Token that explicitly included "metadata_read" but that didn't help.

this question on stackoverflow

The error I get back:

        "errors": [
                "code": "UNAUTHORIZED",
                "message": "authentication required, visit for more information.",
                "detail": [
                        "Type": "repository",
                        "Name": "my-image",
                        "Action": "metadata_read"
Azure Container Registry
Azure Container Registry
An Azure service that provides a registry of Docker and Open Container Initiative images.
382 questions
{count} vote

1 answer

Sort by: Most helpful
  1. vipullag-MSFT 24,021 Reputation points Microsoft Employee

    Hello Justin Williams

    Welcome to Microsoft Q&A Platform, thanks for posting your query here.

    Apologies for delayed response on this. Based on the details shared, the ask from is on the ACR side. I assume that you may want to do this Create a token with repository-scoped permissions.

    If this is not the case, then I would recommend to open a GitHub Issue on the page.

    Hope this helps.

    0 comments No comments