Hi,
I'm trying to create a Service Principle to use Terraform to create and manage my AKS. I'm successfully logged in to Azure CLI and can list all the subscriptions and resources. My issue starts when I'm trying to use the next cli command:
SERVICE_PRINCIPAL_JSON=$(az ad sp create-for-rbac --skip-assignment --name aks-getting-started-sp -o json)
I get a response:
WARNING: Option '--skip-assignment' has been deprecated and will be removed in a future release.
ERROR: Insufficient privileges to complete the operation.
after I removed --skip-assignment and tried again with:
SERVICE_PRINCIPAL_JSON=$(az ad sp create-for-rbac --name aks-getting-started-sp -o json)
I got:
ERROR: Insufficient privileges to complete the operation.
In the documentation, it says next:
but I have both Owner and User Access Administrator roles on the subscription I'm trying to use: