azureazure-storageazure-cli

Can't create Azure Storage Account: SubscriptionNotFound


I'm working through some tutorials, and after successfully creating a resource group, I cannot create a corresponding storage account.

az login

Cmd to create resource group:

az group create --location "Central US" --name <my_resource_group_name>

This runs with "provisioningState": "Succeeded"

Cmd to create account storage:

az storage create --name "some_name" --resource-group <my_resource_group_name> 

This fails with (SubscriptionNotFound)

Subscription <my_subscription_id> was not found.
Code: SubscriptionNotFound
Message: Subscription <my_subscription_id> was not found.

Is the tutorial missing a step in between? Azure is obviously 'finding' my subscription id, but I'm not sure what else is causing the error.


Solution

  • Subscription <my_subscription_id> was not found. Code: SubscriptionNotFound Message: Subscription <my_subscription_id> was not found.

    The above error occurs when Microsoft.Storage Resource Provider is not registered for the subscription.

    Portal:

    Portal-> < Your-Subscription> -> Resource providers -> search Microsoft. Storage -> Register.

    enter image description here