az iot adr ns device

Note

This reference is part of the azure-iot extension for the Azure CLI (version 2.73.0 or higher). The extension will automatically install the first time you run an az iot adr ns device command. Learn more about extensions.

Command group 'iot adr ns' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Manage Registry Devices in a Device Registry namespace.

Registry Devices use the 2026-11-02-preview management API. Device creation does not itself issue credentials or create service capabilities. Authentication profiles and capabilities are materialized by the provisioning services.

Commands

Name Description Type Status
az iot adr ns device attribute

Manage Registry Device attributes.

Extension Preview
az iot adr ns device attribute create

Create or replace a User-reported attribute.

Extension Preview
az iot adr ns device attribute delete

Delete an attribute by its literal resource name.

Extension Preview
az iot adr ns device attribute list

List attributes, including service-reported metadata.

Extension Preview
az iot adr ns device attribute show

Get an attribute.

Extension Preview
az iot adr ns device auth

Inspect service-materialized authentication profiles.

Extension Preview
az iot adr ns device auth list

List authentication profile metadata, not plaintext keys.

Extension Preview
az iot adr ns device auth revoke-certs

Revoke certificates for a CA-signed X.509 profile.

Extension Preview
az iot adr ns device auth show

Get authentication profile metadata.

Extension Preview
az iot adr ns device auth show-keys

Retrieve plaintext keys for a SymmetricKey profile.

Extension Preview
az iot adr ns device auth wait

Wait for authentication profile materialization or a specified condition.

Extension Preview
az iot adr ns device capability

Inspect service-materialized Registry Device capabilities.

Extension Preview
az iot adr ns device capability list

List Registry Device capabilities.

Extension Preview
az iot adr ns device capability show

Get a discovered capability.

Extension Preview
az iot adr ns device create

Create or replace a Registry Device.

Extension Preview
az iot adr ns device delete

Delete a Registry Device.

Extension Preview
az iot adr ns device list

List all Registry Devices in a namespace.

Extension Preview
az iot adr ns device show

Get a Registry Device by name or external device ID.

Extension Preview
az iot adr ns device update

Update writable Registry Device properties.

Extension Preview
az iot adr ns device wait

Wait for Registry Device provisioning or a specified condition.

Extension Preview

az iot adr ns device create

Preview

Command group 'iot adr ns device' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Create or replace a Registry Device.

Location defaults to the namespace location. External device ID is create-only.

az iot adr ns device create --device-name --dn --name
                            --namespace --ns
                            --resource-group
                            [--acquire-policy-token]
                            [--change-reference]
                            [--enablement-state {Disabled, Enabled}]
                            [--ext-id --external-device-id]
                            [--hardware-revision]
                            [--location]
                            [--manufacturer]
                            [--model]
                            [--no-wait]
                            [--software-revision]
                            [--tags]

Examples

Create an enabled device.

az iot adr ns device create -n my-device --ns my-ns -g MyRG --external-device-id factory-device-1 --manufacturer Contoso

Required Parameters

--device-name --dn --name -n

Name of the Registry Device.

--namespace --ns

Name of the Device Registry namespace.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--enablement-state

Whether the Registry Device is enabled or disabled.

Property Value
Default value: Enabled
Accepted values: Disabled, Enabled
--ext-id --external-device-id

Customer-provided device ID. This property is create-only.

--hardware-revision

Hardware revision of the Registry Device.

--location -l

Location. Values from: az account list-locations. You can configure the default location using az configure --defaults location=<location>.

--manufacturer

Manufacturer of the Registry Device.

--model

Model of the Registry Device.

--no-wait

Do not wait for the long-running operation to finish.

Property Value
Default value: False
--software-revision

Software revision of the Registry Device.

--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az iot adr ns device delete

Preview

Command group 'iot adr ns device' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Delete a Registry Device.

az iot adr ns device delete --device-name --dn --name
                            --namespace --ns
                            --resource-group
                            [--acquire-policy-token]
                            [--change-reference]
                            [--no-wait]
                            [--yes {false, true}]

Examples

Delete a device and wait for its absence.

az iot adr ns device delete -n my-device --ns my-ns -g MyRG --yes --no-wait
az iot adr ns device wait -n my-device --ns my-ns -g MyRG --deleted

Required Parameters

--device-name --dn --name -n

Name of the Registry Device.

--namespace --ns

Name of the Device Registry namespace.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--no-wait

Do not wait for the long-running operation to finish.

Property Value
Default value: False
--yes -y

Skip user prompts. Indicates acceptance of action. Used primarily for automation scenarios. Default: false.

Property Value
Accepted values: false, true
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az iot adr ns device list

Preview

Command group 'iot adr ns device' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

List all Registry Devices in a namespace.

az iot adr ns device list --namespace --ns
                          --resource-group

Examples

List devices.

az iot adr ns device list --ns my-ns -g MyRG

Required Parameters

--namespace --ns

Name of the Device Registry namespace.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az iot adr ns device show

Preview

Command group 'iot adr ns device' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Get a Registry Device by name or external device ID.

External ID lookup scans every namespace page and fails on ambiguous matches.

az iot adr ns device show --namespace --ns
                          --resource-group
                          [--device-name --dn --name]
                          [--ext-id --external-device-id]

Examples

Resolve a provisioned device without guessing its Registry Device name.

az iot adr ns device show --external-device-id factory-device-1 --ns my-ns -g MyRG

Required Parameters

--namespace --ns

Name of the Device Registry namespace.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--device-name --dn --name -n

Name of the Registry Device.

--ext-id --external-device-id

Customer-provided external ID. Specify exactly one of this option or --name. Lookup follows all namespace result pages; duplicate matches are an error.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az iot adr ns device update

Preview

Command group 'iot adr ns device' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Update writable Registry Device properties.

Only supplied fields are patched. Unspecified properties are preserved.

az iot adr ns device update --device-name --dn --name
                            --namespace --ns
                            --resource-group
                            [--acquire-policy-token]
                            [--change-reference]
                            [--enablement-state {Disabled, Enabled}]
                            [--hardware-revision]
                            [--manufacturer]
                            [--model]
                            [--no-wait]
                            [--software-revision]
                            [--tags]

Examples

Disable a device without replacing its metadata.

az iot adr ns device update -n my-device --ns my-ns -g MyRG --enablement-state Disabled

Required Parameters

--device-name --dn --name -n

Name of the Registry Device.

--namespace --ns

Name of the Device Registry namespace.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--enablement-state

Whether the Registry Device is enabled or disabled.

Property Value
Accepted values: Disabled, Enabled
--hardware-revision

Hardware revision of the Registry Device.

--manufacturer

Manufacturer of the Registry Device.

--model

Model of the Registry Device.

--no-wait

Do not wait for the long-running operation to finish.

Property Value
Default value: False
--software-revision

Software revision of the Registry Device.

--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az iot adr ns device wait

Preview

Command group 'iot adr ns device' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Wait for Registry Device provisioning or a specified condition.

By default waits for provisioningState Succeeded and fails on Failed or Canceled. Use --exists for materialization alone or --deleted for absence. Specify exactly one of --name and --external-device-id.

az iot adr ns device wait --namespace --ns
                          --resource-group
                          [--acquire-policy-token]
                          [--change-reference]
                          [--created]
                          [--custom]
                          [--deleted]
                          [--device-name --dn --name]
                          [--exists]
                          [--ext-id --external-device-id]
                          [--interval]
                          [--timeout]
                          [--updated]

Examples

Wait for a device materialized by registration.

az iot adr ns device wait --external-device-id factory-device-1 --ns my-ns -g MyRG --exists --timeout 600 --interval 10

Required Parameters

--namespace --ns

Name of the Device Registry namespace.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--created

Wait until provisioningState is Succeeded.

Property Value
Parameter group: Wait Condition Arguments
Default value: False
--custom

Wait until a custom JMESPath expression evaluates to true.

Property Value
Parameter group: Wait Condition Arguments
--deleted

Wait until the resource is deleted.

Property Value
Parameter group: Wait Condition Arguments
Default value: False
--device-name --dn --name -n

Name of the Registry Device.

--exists

Wait until the resource exists.

Property Value
Parameter group: Wait Condition Arguments
Default value: False
--ext-id --external-device-id

Customer-provided external ID. Specify exactly one of this option or --name. Lookup follows all namespace result pages; duplicate matches are an error.

--interval

Polling interval in seconds.

Property Value
Parameter group: Wait Condition Arguments
Default value: 30
--timeout

Polling budget in seconds, including GET time. An in-flight GET is bounded by transport timeouts and cannot be interrupted by this polling deadline.

Property Value
Parameter group: Wait Condition Arguments
Default value: 3600
--updated

Wait until provisioningState is Succeeded.

Property Value
Parameter group: Wait Condition Arguments
Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False