Hello Satyam Kumar
From the Portal snippet shared, it looks like you are not the owner for the ACR resource, could you please answer below queries to understand more about your issue :
- Do you have the read roles assigned to your user by the Owner of the resource?
- For the azure cli command failure, are you using service Principal to login to the ACR or are you using the Admin credentials?
If it's service principal, can you please review and share what IAM roles you have assigned to your service principal. - Also is your ACR publicly accessible or is it part of some private endpoint?
In order to replicate the issue on my end, I created an ACR and assigned AcrPull
to my teammate at the resource group level, along with the Reader at the resource group scope and he was able to access it.
Additionally, I created a new service principal using the bash script listed out here: https://xtls-v4.hkg1.meaqua.org/en-us/azure/container-registry/container-registry-auth-service-principal#create-a-service-principal
Sharing the Azure CLI sample command that worked for me:
az acr login --name <ACR-Name> -u <Service principal ID> -p <Service principal password>
az acr repository list --name <ACR-Name> --output table