Azure CLI: “The current subscription type is not permitted to perform operations on any provider namespace. Please use a different subscription.”

Another helpful error message out of Azure.

I was trying something out in Azure CLI and attempting the trivial task of creating a resource group with az group create --name parentGroup --location westeurope in a subscription that I’d logged on to with a named account (jonny@domain.com) as opposed to what I normally use, which is the service principal.

Anyway, in the CLI, I was getting the error:

The current subscription type is not permitted to perform operations on any provider namespace. Please use a different subscription.

Mmm. Not enough permissions? Can’t be. Aha. I know, my named account has access to multiple subscriptions.

How to set to one subscription?

az account set --subscription "My Demos"

Retrying the create resource group command worked.

HTH

Please feel free to leave a comment...