Search code examples
azureiotazure-iot-central

Generate the SAS key for the Azure IoT Central using PowerShell


I tried the below code to generate the SAS key for the Azure IoT Central.

az iot central device compute-device-key --pk {primaryKey} --device-id {deviceid}

But it gives the below error.

enter image description here

Please let me know how to generate the SAS key for the Azure IoT Central using PowerShell


Solution

  • You need to update your azure-iot extension for Azure CLI. You might also need to update Azure CLI itself.

    az extension update --name azure-iot

    https://github.com/Azure/azure-iot-cli-extension#installation