Hello CKAU,
I understand you are unable to complete the deployment of Azure IoT Operations (AIO) because the creation of the Device Registry Namespace fails with a ResourceCreationValidateFailed error, both in the Azure Portal wizard and via the CLI.
This is a blocking issue preventing you from onboarding new instances. The error code ResourceCreationValidateFailed (HTTP 400) indicates that the Resource Provider received the request but rejected it because the data provided did not meet specific validation criteria. Since the CLI output is generic, we need to dig deeper to find the specific validation rule that failed.
Recommended steps:
Step 1: Inspect the Azure Activity Log
- Go to the Azure Portal and search for Activity Log.
- Filter the Timespan when you ran the command.
- Look for an operation named "Create or Update Namespace" (or similar under
Microsoft.DeviceRegistry) that has a status of Failed. - Click on that operation to open the details pane.
- Click the JSON tab at the bottom of the details pane.
- Scroll down to
properties->statusMessage. This field often contains the specific text explaining why validation failed (e.g., "Namespace name already in use globally," "Subscription not authorized," or "Quota exceeded").
Step 2: Check for "Soft Deleted" Resources
- A common cause for validation failure with naming (even when trying new names) is if a previously deleted resource is in a "soft delete" state or if the name is reserved globally (not just within your resource group).
- Although you tried variations like
cl-az-rt-ns-351-02, ensure that the pattern doesn't violate length or character constraints (alphanumeric and hyphens, typically max 63 chars).
Step 3: Update/Reinstall the CLI Extension
You are using IotOperationsCliExtension/2.0.1. Since AIO is evolving rapidly (GA v1.2), version mismatches between the local extension and the service backend can cause payload validation errors.
- Update the extension to the absolute latest:
az extension update --name azure-iot-ops - If that doesn't work, try removing and re-adding it to clear any cached schemas:
az extension remove --name azure-iot-ops az extension add --name azure-iot-ops
Step 4: Verify Resource Provider Registration
Even though you checked them, sometimes the Microsoft.DeviceRegistry provider needs a refresh.
1.Go to Subscriptions > Your Subscription > Resource providers.
- Search for
Microsoft.DeviceRegistry. - Select it and click Re-register. (This is non-destructive).
Step 5: Check Azure Policy
Since you are the Owner, permissions are fine. However, an Azure Policy assigned at the Management Group or Subscription level could be blocking the creation of this specific resource type (Microsoft.DeviceRegistry/namespaces) or enforcing tag compliance that the wizard isn't satisfying.
- Check the Activity Log (from Step 1) specifically for "Policy" related errors.
If this answer helps clarify the path to resolution, kindly "Accept the answer" to support the community looking for similar remediation.