**TL;DR:** The subscription is not registered to use namespace 'Microsoft.X'. New subscriptions and new services need explicit registration; the error names the exact namespace to register. Fix: Wait until Registered (can take minutes). Verify: az provider show says Registered, then the original create command succeeds.

## The fix

**TL;DR:** The subscription is not registered to use namespace 'Microsoft.X'. New subscriptions and new services need explicit registration; the error names the exact namespace to register. Fix: Wait until Registered (can take minutes). Verify: az provider show says Registered, then the original create command succeeds.

## The fix

1. **New subscriptions** register only a common subset. The first AKS, the first Key Vault with certain features, the first Data Factory in a sub all hit this.

2. **Terraform/Bicep.** The azurerm provider can auto-register (`resource_provider_registrations = "core"`), but explicit registration in your bootstrap script is more predictable than relying on provider behavior.

3. **Permission.** Registering needs Contributor on the subscription (or the specific `Microsoft.Resources/subscriptions/resourceGroups` write). A service principal with only resource-group scope cannot self-register; register from a broader identity first.

4. **Do not confuse with feature flags.** Some services need both provider registration AND a preview feature flag (`az feature register`). If registration succeeds but creation still fails, check for a feature flag. Verify: `az provider show` says Registered, then the original create command succeeds.

## When to use this

- This covers exactly what the title says: Azure.
- You are setting this up for the first time, or auditing an existing setup.
- You want the key gotchas in one place before you start.

## When not to use this

- You are doing a different workflow with Azure; these steps are specific to the title above.
- You need the full reference docs; this is the short path, not the manual.

## Compatibility

- Not pinned to a specific version; follows current Azure behavior.