I have created a Azure Service Principal like this
az ad sp create-for-rbac --name $SERVICE_PRINCIPAL_NAME --scopes $ACR_REGISTRY_ID --role reader
after logging in (az login --service-principal -u $SERVICE_PRINCIPAL_NAME -p $SERVICE_PRINCIPAL_ID --tenant $TENANT_ID
) I am able to see all the images (az acr repository list --name $ACR_REGISTRY_NAME
) which are in my registry, but I can not push or pull images (docker pull myregistry.azurecr.io/myimage:latest
).
Are there any permissions I am not aware of? I have tried the similar with other roles like owner
or contributor
, but also SPs are getting the same error, which is the following:
Error response from daemon: Get https://myregistry.azurecr.io/v2/myimage/latest/manifests/latest: unauthorized: authentication required
Update 14. of August:
I am also not able to docker login with the SP
Error response from daemon: Get myregistry.azurecr.io/v2: unauthorized: authentication required
docker login
first. – jesugmz