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.

az account list --output table

Name                                         CloudName    SubscriptionId                        State     IsDefault
-------------------------------------------  -----------  ------------------------------------  --------  -----------
My Production Subscription                   AzureCloud   XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX  Enabled
My DevTest Subscription                      AzureCloud   XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX  Enabled   True
My Demos                                     AzureCloud   XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX  Enabled

How to set to one subscription?

az account set --subscription "My Demos"

Retrying the create resource group command worked.

HTH

Leave a Reply

Your email address will not be published. Required fields are marked *

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax

This site uses Akismet to reduce spam. Learn how your comment data is processed.