Azure / Azure/azure-cli

Customer feedback | az storage account create | incorrect / misleading error message when

Open
#29,267 3 comments 0 reactions 2 assignees Claimed by @calvinhzy View on GitHub
act-codegen-extensibility-squad Auto-Assign bug Service Attention Storage
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

### Describe the bug

Assuming the customer has not incorrectly typed a subscription name or ID, they receive a "subscription not found" error when a resource provider is not registered in the active subscription. For example, if you want to execute `az storage account create`, the `Microsoft.Storage` provider must be registered. To register a resource provider, see [Azure resource providers and types](https://review.learn.microsoft.com/en-us/azure/azure-resource-manager/management/resource-providers-and-types).

This error should say "Error: The resource provider for `Microsoft.Storage` must be registered to run `az storage account create`. To learn how to register a resource provider, see \[Azure resource providers and types](https://review.learn.microsoft.com/en-us/azure/azure-resource-manager/management/resource-providers-and-types). Then, rerun the command." ... or something similar.

Telling the customer "subscription not found" might be correct "downstream", but it is not the primary problem and changing or resetting your subscription doesn't fix the problem.

### Related command

az storage account create

### Errors

![image](https://github.com/Azure/azure-cli/assets/58762114/0b70fa2a-4497-4351-bf2d-8b1ed234ef5d)

### Issue script & Debug output

n/a

### Expected behavior

A clear and informative error message.

### Environment Summary

Version 2.61.0

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.