'device-identity' is not in the 'az iot hub'

When provisioning devices in the Azure IotHub, you might get following error:

"az iot hub: 'device-identity' is not in the 'az iot hub' command group. See 'az iot hub --help'."

This usually happen during provisioning process of device. Here is an example of Azure CLI command, which can cause this error:

az iot hub device-identity create --device-id myEdgeDevice --hub-name {iothubname} --edge-enabled

To make this working, you will have to install the Azure CLI extension for device identity:

az extension add --name azure-cli-iot-ext

comments powered by Disqus