The resource with name 'name' and type 'Microsoft.ContainerRegistry/registries' could not be found in subscription

Susheel Bhatt 351 Reputation points
2023-03-10T13:42:26.9466667+00:00

I am working on a script where I want to run az acr import. The command tries to list the repository but fails with the error: The resource with name 'name' and type 'Microsoft.ContainerRegistry/registries' could not be found in subscription

As you can see in the screenshot below. This registry is indeed present in the subscription. I am able to login, run docker push as well which completes successfully. But az acr show returns a failure.

Please note that I am the owner of this subscription.

enter image description here

Azure Container Registry
Azure Container Registry
An Azure service that provides a registry of Docker and Open Container Initiative images.
380 questions
Azure Container Instances
Azure Container Instances
An Azure service that provides customers with a serverless container experience.
630 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Shailendra Singh Chauhan 5 Reputation points
    2024-02-19T17:26:43.95+00:00

    I had the same issue, and I followed/checked everything in this thread.

    1. Provider was registered
    2. Created the ACR
    3. Visible in portal
    4. Not visible by az cli In my case, I have to just wait for 10 -15 minutes for it to work as expected.
    1 person found this answer helpful.
    0 comments No comments

  2. Andrei Barbu 2,576 Reputation points Microsoft Employee
    2023-03-10T14:07:13.32+00:00

    Hello Sushell!

    1 - Can you try to run "az acr list -o table" and see if that displays your ACR?

    2 - Can you try to add "--subscription <subscription-id>" next to "az acr show" or "az acr list" or run "az account set --subscription <subscription-id>"?

    3 - Can you try to run the same commands from Cloud Shell in order to attempt isolating the issue and understand if it is something general or related to your terminal?

    If these suggestions helped you address the issue, please "Accept as Answer" and Upvote if it helped, so that it can help others in the community looking for help on similar topics.

    Thank you!