**TL;DR:** Symptom: The subscription is not registered to use namespace 'Microsoft.X' Cause: New or rarely-used subscriptions have not registered the resource provider namespace the deployment needs. The namespace named in the error is the exact one to register. CONFIRM IT CONFIRM: az provider show --namespace Microsoft.X --query registrationState returns NotRegistered. FIX FIX: az provider register --namespace Microsoft.X, poll until az provider show reports Registered, then retry the deployment.

## The fix

SYMPTOM
The subscription is not registered to use namespace 'Microsoft.X'

CAUSE
New or rarely-used subscriptions have not registered the resource provider namespace the deployment needs. The namespace named in the error is the exact one to register.

CONFIRM IT
CONFIRM: `az provider show --namespace Microsoft.X --query registrationState` returns NotRegistered.

FIX
FIX: `az provider register --namespace Microsoft.X`, poll until `az provider show` reports Registered, then retry the deployment. Needs subscription-level permission; a resource-group-scoped service principal cannot do this.

VERIFY
VERIFY: registrationState is Registered and the original create command succeeds.

## When to use this

- This covers exactly what the title says: Diagnose.
- 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 Diagnose; 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 Diagnose behavior.