Could not create a role assignment for ACR. Are you an Owner on this subscription?

Rex Benny 6 Reputation points
2021-06-07T06:25:36.707+00:00

When I try to assign acrpull role on ACR to the AKS-generated service principal for AKS cluster to be able to pull images from ACR receiving the error

Could not create a role assignment for ACR. Are you an Owner on this subscription?

I the owner of the subscription, assigned global admin privileges.

Commands executed as follows:

Assign acrpull role on our ACR to the AKS-generated service principal, the AKS cluster will then be able to pull images from our ACR

$ ACR_ID=$(az acr show -n $acr -g $rg --query id -o tsv)
$ az aks update -g $rg -n $aks --attach-acr $ACR_ID

Azure Container Registry
Azure Container Registry
An Azure service that provides a registry of Docker and Open Container Initiative images.
394 questions
Azure Kubernetes Service (AKS)
Azure Kubernetes Service (AKS)
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
1,867 questions
{count} vote

1 answer

Sort by: Most helpful
  1. Sam 1 Reputation point
    2022-09-20T06:17:21.927+00:00

    Hi,

    Could you please confirm if the above mentioned steps can resolve the Could not create a role assignment for ACR. Are you an Owner on this subscription? error while attaching the AKS cluster(Managed Identity/ServICE principle) to ACR.

    Also, please include the steps to check if there is an existing service principal already created for the AKS cluster.

    Thanks