An Azure service that provides a registry of Docker and Open Container Initiative images.
Hello @ritesh ,
Kindly double check role assignments:
- Go to your Azure Container Registry ->Access Control (IAM) -> Role assignments.
- Filter for your Service Principal and confirm the roles are listed (ACRPush, ACRPull, ACRDelete) and the scope is the right ACR
If that also doesn't help, can you try out the following steps to create a new Service Principal and assign the roles to it.
[note: These are the steps that I followed to replicate the issue on my end, and it worked out perfectly fine for me]
- Create Service Principal using the script listed out here: https://learn.microsoft.com/en-us/azure/container-registry/container-registry-auth-service-principal#create-a-service-principal After running the script, it'll will show created Service Principal and the password, save it with you. NOTE: In the below script, Replace ACR_NAME=<Your-ACR-name>, SERVICE_PRINCIPAL_NAME=<Your-New-SP-name>
Service principal ID: XXXXXXXXXXXXXXXXXXXXXXXX Service principal password: XXXXXXXXXXXXXXXXXXXXXXXX#!/bin/bash ACR_NAME=$containerRegistry SERVICE_PRINCIPAL_NAME=$servicePrincipal ACR_REGISTRY_ID=$(az acr show --name $ACR_NAME --query "id" --output tsv) PASSWORD=$(az ad sp create-for-rbac --name $SERVICE_PRINCIPAL_NAME --scopes $ACR_REGISTRY_ID --role acrpush --query "password" --output tsv) USER_NAME=$(az ad sp list --display-name $SERVICE_PRINCIPAL_NAME --query "[].appId" --output tsv) # Output the service principal's credentials; use these in your services and # applications to authenticate to the container registry. echo "Service principal ID: $USER_NAME" echo "Service principal password: $PASSWORD" - Use the below command to login to Azure Container Registry:
az acr login --name <ACR-Name> -u <Service principal ID> -p <Service principal password> - Use below command to list out the repository:
This should give you the repository list in the output.az acr repository list --name <ACR-Name> --output table
If this also doesn't help then to help you further with the case, we need some additional information from you.
Could you please provide the following details so we can investigate:
- Are you the Subscription Owner or Resource Group owner? If not, what RBAC roles or permissions are assigned to your user account?
- Can you pull or push images to the ACR?
- Can you view the images using Azure CLI, for example with the az acr repository show command? Sample command: az acr repository show -n myregistry --image hello-world:latest Reference: https://learn.microsoft.com/en-us/cli/azure/acr/repository?view=azure-cli-latest#az-acr-repository-show
Credits: