Dávid Molnár
Dávid Molnár

Reputation: 11533

Unable to create storage for persisting account files in Azure Cloud Shell (CLI)

I'm trying to setup Azure CLI. The first step is to create a storage for account files. I'm using my Developer Program Benefit subscription.

Persist account files dialog

After I click "Create storage" I get an error:

Storage creation failed
Error:409
{"error":{"code":"MissingSubscriptionRegistration","message":"The subscription is not registered to use namespace 'Microsoft.Storage'. See https://aka.ms/rps-not-found for how to register subscriptions."}}
Can't create a storage account. Please try again.

How to resolve this issue?

Storage creation failed

Upvotes: 0

Views: 4330

Answers (2)

Gaurav Mantri
Gaurav Mantri

Reputation: 136146

The reason you're getting this error is because Microsoft.Storage resource provider which manages Storage Account related resources and activities is not registered with your Azure Subscription.

To fix this, please run the following command:

azure provider register --namespace "Microsoft.Storage" --subscription "<your subscription name or id>"

To get the subscription name/id, please run the following command:

azure account list

For more details on why you're getting this error, please see this: The subscription is not registered to use namespace 'Microsoft.DataFactory error


If you prefer GUI, then you can do it on the Azure portal too:

  1. On the left pane click More services and then select Subscriptions
  2. Select the subscription, in our case Developer Program Benefit
  3. In the Settings area click Resource providers
  4. Find Microsoft.Storage and click Register

Upvotes: 2

Related Questions