New-AzStorageAccount claims subscription not found

Beth Jelich 40 Reputation points
2023-12-20T23:26:35.15+00:00

Using pwsh to create blob storage, I am getting the following error:

Subscription <mysubscriptionnum> was not found.

But I am logged in to the Azure portal and can look at my subscription (12 month free trial), so I am confused. The reported subscription number in the error message matches my subscription. And yes, I made sure I was connected to azure first in the pwsh shell.

Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
3,200 questions
0 comments No comments
{count} votes

Accepted answer
  1. Anand Prakash Yadav 7,860 Reputation points Microsoft External Staff
    2023-12-21T09:57:57.83+00:00

    Hello Beth Jelich,

    Thank you for posting your query here!

    I understand that when you use New-AzStorageAccount a Subscription was not found error appears, even though the subscription definitely exists and is accessible.

    It is possible that the Microsoft.Storage Resource Provider is not registered for this subscription.

    Please try to register the Microsoft.Storage Resource Provider for the selected subscription. This can be done using the Resource providers blade on the Subscription page in the Azure Portal.

    User's image

    Note: Free Trial subscriptions are only valid for 30 days. However, there are some services that are available for free for 12 months. But even to use these 12 months free services, you will need an active subscription.

    Reference: https://azure.microsoft.com/en-in/free/free-account-faq

    Do let us know if the issue persists or if you have any further queries. I am happy to assist.

    Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    7 people found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.