azureazure-resource-group

Azure- Getting (AuthorizationFailed) even with owner role assigned to my account


When I run az aks get-credentials --name project --resource-group project-rg, I get the following error: enter image description here

but I have owner access level in the resource group: enter image description here

I've tried 1. logging out and logging in. 2. az account set --subscription guid2. 3. checked if I have the right permissions (checked Microsoft.ContainerService/managedClusters/listClusterAdminCredential/action Neither has worked. Any suggestions?enter image description here

Solution- turns out I didn't run the az account set --subscription <guid>


Solution

  • ...Turns out I needed to set the cluster subscription using az account set --subscription <guid>