az iot hub device-identity connection-string

Note

This reference is part of the azure-iot extension for Azure CLI and requires version 2.0.70 or higher. The extension will automatically install the first time you run an az iot hub device-identity connection-string command. Learn more about extensions.

Manage IoT device's connection string.

Commands

az iot hub device-identity connection-string show

Show a given IoT Hub device connection string.

az iot hub device-identity connection-string show

Show a given IoT Hub device connection string.

az iot hub device-identity connection-string show --device-id
                                                  [--hub-name]
                                                  [--key-type {primary, secondary}]
                                                  [--login]
                                                  [--resource-group]

Required Parameters

--device-id -d

Target Device.

Optional Parameters

--hub-name -n

IoT Hub name.

--key-type --kt

Shared access policy key type for authentication.

accepted values: primary, secondary
default value: primary
--login -l

This command supports an entity connection string with rights to perform action. Use to avoid session login via "az login". If both an entity connection string and name are provided the connection string takes priority.

--resource-group -g

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