{"id":15291216,"url":"https://github.com/azure/azure-iot-cli-extension","last_synced_at":"2026-01-23T19:05:52.043Z","repository":{"id":37275939,"uuid":"103456760","full_name":"Azure/azure-iot-cli-extension","owner":"Azure","description":"Azure IoT extension for Azure CLI","archived":false,"fork":false,"pushed_at":"2025-04-03T20:42:28.000Z","size":6392,"stargazers_count":84,"open_issues_count":21,"forks_count":67,"subscribers_count":14,"default_branch":"dev","last_synced_at":"2025-04-04T18:08:37.681Z","etag":null,"topics":["azure","azure-cli","azure-cli-extension","azure-device-update","azure-iot","azure-iot-automation","azure-iot-central","azure-iot-devops","azure-iot-dps","azure-iot-dt","azure-iot-edge","azure-iot-extension","azure-iothub","cicd","command-line","iot","iot-cli","iot-edge","iot-extension"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Azure.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.rst","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-09-13T22:04:36.000Z","updated_at":"2025-03-09T21:39:17.000Z","dependencies_parsed_at":"2024-06-28T18:43:10.756Z","dependency_job_id":"a44da2c6-7131-4a13-9d5d-edfb79e808cd","html_url":"https://github.com/Azure/azure-iot-cli-extension","commit_stats":null,"previous_names":[],"tags_count":86,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Azure%2Fazure-iot-cli-extension","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Azure%2Fazure-iot-cli-extension/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Azure%2Fazure-iot-cli-extension/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Azure%2Fazure-iot-cli-extension/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Azure","download_url":"https://codeload.github.com/Azure/azure-iot-cli-extension/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247226215,"owners_count":20904465,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["azure","azure-cli","azure-cli-extension","azure-device-update","azure-iot","azure-iot-automation","azure-iot-central","azure-iot-devops","azure-iot-dps","azure-iot-dt","azure-iot-edge","azure-iot-extension","azure-iothub","cicd","command-line","iot","iot-cli","iot-edge","iot-extension"],"created_at":"2024-09-30T16:11:28.025Z","updated_at":"2026-01-23T19:05:52.037Z","avatar_url":"https://github.com/Azure.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Microsoft Azure IoT extension for Azure CLI\n\n![Python](https://img.shields.io/pypi/pyversions/azure-cli.svg?maxAge=2592000)\n![Build Status](https://dev.azure.com/azureiotdevxp/aziotcli/_apis/build/status/Merge%20-%20Azure.azure-iot-cli-extension?branchName=dev)\n\nThe **Azure IoT extension for Azure CLI** aims to accelerate the development, management and automation of Azure IoT solutions. It does this via addition of rich features and functionality to the official [Azure CLI](https://learn.microsoft.com/en-us/cli/azure).\n\n## News\n\n- ❗ When upgrading your Azure CLI core version, for the best experience and to avoid breaking changes, we recommend updating your `azure-iot` extension to the [latest available](https://github.com/Azure/azure-iot-cli-extension/releases).\n\n- Azure CLI `2.24.0` requires an `azure-iot` extension update to `0.10.11` or later for IoT Hub commands to work properly. However **we recommend** at least `azure-iot` `0.10.14`. Updating the extension can be done with `az extension update --name azure-iot`.\n\n\u003e Note: A common error that arises when using an older `azure-iot` with Azure CLI `2.24.0+` shows as follows: `AttributeError: 'IotHubResourceOperations' object has no attribute 'config'`.\n\n- Starting with version `0.10.13` of the IoT extension, you will need an Azure CLI core version of `2.17.1` or higher. IoT extension version `0.10.11` remains on the extension index to support environments that cannot upgrade core CLI versions.\n\n- The legacy IoT extension Id `azure-cli-iot-ext` is deprecated in favor of the new modern Id `azure-iot`. `azure-iot` is a superset of `azure-cli-iot-ext` and any new features or fixes will apply to `azure-iot` only. Also the legacy and modern IoT extension should **never** co-exist in the same CLI environment.\n\n    Uninstall the legacy extension with the following command: `az extension remove --name azure-cli-iot-ext`.\n\n    Related - if you see an error with a stacktrace similar to:\n\n    ```text\n    ...\n    azure-cli-iot-ext/azext_iot/common/_azure.py, ln 90, in get_iot_hub_connection_string\n        client = iot_hub_service_factory(cmd.cli_ctx)\n    cliextensions/azure-cli-iot-ext/azext_iot/_factory.py, ln 29, in iot_hub_service_factory\n        from azure.mgmt.iothub.iot_hub_client import IotHubClient\n    ModuleNotFoundError: No module named 'azure.mgmt.iothub.iot_hub_client'\n    ```\n\n    The resolution is to remove the deprecated `azure-cli-iot-ext` and install any version of the `azure-iot` extension.\n\n## Commands\n\nPlease refer to the official `az iot` reference on [Microsoft Docs](https://learn.microsoft.com/en-us/cli/azure/ext/azure-iot/iot) for a complete list of supported commands.  You can also find IoT CLI usage tips on the [wiki](https://github.com/Azure/azure-iot-cli-extension/wiki/Tips).\n\n## Installation\n\n1. Install the [Azure CLI](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli)\n    - You must have at least `v2.59.0` for the latest versions of `azure-iot`, which you can verify with `az --version`\n1. Add, Update or Remove the IoT extension with the following commands:\n    - Add: `az extension add --name azure-iot`\n    - Update: `az extension update --name azure-iot`\n    - Remove: `az extension remove --name azure-iot`\n\nPlease refer to the [Installation Troubleshooting Guide](docs/install-help.md) if you run into any issues or the [Alternative Installation Methods](docs/alt-install-methods.md) if you'd like to install from a GitHub release or local source.\n\n## Usage\n\nAfter installing the Azure IoT extension your CLI environment is augmented with the addition of `hub`, `central`, `dps`, `dt`, `edge` and `device` commands.\n\nFor usage and help content of any command or command group, pass in the `-h` parameter. Root command group details are shown for the following IoT services.\n\n\u003e **Click** a section to expand or collapse\n\n\u003cdetails open\u003e\n  \u003csummary\u003eDigital Twins\u003c/summary\u003e\n\n```text\n$ az dt -h\n\nGroup\n    az dt : Manage Azure Digital Twins solutions \u0026 infrastructure.\n\nSubgroups:\n    data-history    : Manage and configure data history.\n    endpoint        : Manage and configure Digital Twins instance endpoints.\n    job             : Manage and configure jobs for a digital twin instance.\n    model           : Manage DTDL models and definitions on a Digital Twins instance.\n    network         : Manage Digital Twins network configuration including private links and\n                      endpoint connections.\n    role-assignment : Manage RBAC role assignments for a Digital Twins instance.\n    route           : Manage and configure event routes.\n    twin            : Manage and configure the digital twins of a Digital Twins instance.\n\nCommands:\n    create          : Create or update a Digital Twins instance.\n    delete          : Delete an existing Digital Twins instance.\n    list            : List the collection of Digital Twins instances by subscription or resource\n                      group.\n    reset [Preview] : Reset an existing Digital Twins instance by deleting associated\n                      assets. Currently only supports deleting models and twins.\n    show            : Show an existing Digital Twins instance.\n    wait            : Wait until an operation on an Digital Twins instance is complete.\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eIoT Central\u003c/summary\u003e\n\n```text\n$ az iot central -h\n\nGroup\n    az iot central : Manage IoT Central resources.\n        IoT Central is an IoT application platform that reduces the burden and cost of developing,\n        managing, and maintaining enterprise-grade IoT solutions. Choosing to build with IoT Central\n        gives you the opportunity to focus time, money, and energy on transforming your business\n        with IoT data, rather than just maintaining and updating a complex and continually evolving\n        IoT infrastructure.\n\n        IoT Central documentation is available at https://aka.ms/iotcentral-documentation\n        Additional information on CLI commands is available at https://aka.ms/azure-cli-iot-ext.\n\nSubgroups:\n    api-token             : Manage API tokens for your IoT Central application.\n    app                   : Manage IoT Central applications.\n    device                : Manage and configure IoT Central devices.\n    device-group          : Manage and configure IoT Central device groups.\n    device-template       : Manage and configure IoT Central device templates.\n    diagnostics [Preview] : Perform application and device level diagnostics.\n    enrollment-group      : Manage and configure IoT Central enrollment group.\n    export      [Preview] : Manage and configure IoT Central data exports.\n    file-upload-config    : Manage and configure IoT Central file upload.\n    job                   : Manage and configure jobs for an IoT Central application.\n    organization          : Manage and configure organizations for an IoT Central application.\n    role                  : Manage and configure roles for an IoT Central application.\n    scheduled-job         : Manage and configure IoT Central schedule job.\n    user                  : Manage and configure IoT Central users.\n\nCommands:\n    query       [Preview] : Query device telemetry or property data with IoT Central Query\n                            Language.\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eIoT Device Provisioning\u003c/summary\u003e\n\n```text\n$ az iot dps -h\n\nGroup\n    az iot dps : Manage entities in an Azure IoT Hub Device Provisioning Service (DPS). Augmented\n    with the IoT extension.\n\nSubgroups:\n    access-policy     : Manage Azure IoT Hub Device Provisioning Service access policies.\n    certificate       : Manage Azure IoT Hub Device Provisioning Service certificates.\n    connection-string : Manage connection strings for an Azure IoT Hub Device Provisioning Service\n                        instance.\n    enrollment        : Manage individual device enrollments in an Azure IoT Hub Device Provisioning\n                        Service.\n    enrollment-group  : Manage enrollment groups in an Azure IoT Hub Device Provisioning Service.\n    linked-hub        : Manage Azure IoT Hub Device Provisioning Service linked IoT hubs.\n\nCommands:\n    create            : Create an Azure IoT Hub device provisioning service.\n    delete            : Delete an Azure IoT Hub device provisioning service.\n    list              : List Azure IoT Hub device provisioning services.\n    show              : Get the details of an Azure IoT Hub device provisioning service.\n    update            : Update an Azure IoT Hub device provisioning service.\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eIoT Edge\u003c/summary\u003e\n\n```text\n$ az iot edge -h\n\nGroup\n    az iot edge : Manage IoT solutions on the Edge.\n\nSubgroups:\n    deployment  : Manage IoT Edge deployments at scale.\n\nCommands:\n    set-modules : Set edge modules on a single device.\n```\n\n\u003c/details\u003e\n\n\u003cdetails open\u003e\n  \u003csummary\u003eIoT Hub\u003c/summary\u003e\n\n```text\n$ az iot hub -h\n\nGroup\n    az iot hub : Manage entities in an Azure IoT Hub.\n\nSubgroups:\n    certificate                         : Manage IoT Hub certificates.\n    configuration                       : Manage IoT automatic device management configuration at\n                                          scale.\n    connection-string                   : Manage IoT Hub connection strings.\n    consumer-group                      : Manage the event hub consumer groups of an IoT hub.\n    device-identity                     : Manage IoT devices.\n    device-twin                         : Manage IoT device twin configuration.\n    devicestream                        : Manage device streams of an IoT hub.\n    digital-twin                        : Manipulate and interact with the digital twin of an IoT\n                                          Hub device.\n    distributed-tracing       [Preview] : Manage distributed settings per-device.\n    identity                            : Manage identities of an Azure IoT hub.\n    job                                 : Manage IoT Hub jobs (v2).\n    message-enrichment                  : Manage message enrichments for endpoints of an IoT Hub.\n    module-identity                     : Manage IoT device modules.\n    module-twin                         : Manage IoT device module twin configuration.\n    policy                              : Manage shared access policies of an IoT hub.\n    route                               : Manage routes of an IoT hub.\n    routing-endpoint                    : Manage custom endpoints of an IoT hub.\n\nCommands:\n    create                              : Create an Azure IoT hub.\n    delete                              : Delete an IoT hub.\n    generate-sas-token                  : Generate a SAS token for a target IoT Hub, device or\n                                          module.\n    invoke-device-method                : Invoke a device method.\n    invoke-module-method                : Invoke a module method.\n    list                                : List IoT hubs.\n    list-skus                           : List available pricing tiers.\n    manual-failover                     : Initiate a manual failover for the IoT Hub to the geo-\n                                          paired disaster recovery region.\n    monitor-events                      : Monitor device telemetry \u0026 messages sent to an IoT Hub.\n    monitor-feedback                    : Monitor feedback sent by devices to acknowledge cloud-to-\n                                          device (C2D) messages.\n    query                               : Query an IoT Hub using a powerful SQL-like language.\n    show                                : Get the details of an IoT hub.\n    show-connection-string [Deprecated] : Show the connection strings for an IoT hub.\n    show-quota-metrics                  : Get the quota metrics for an IoT hub.\n    show-stats                          : Get the statistics for an IoT hub.\n    update                              : Update metadata for an IoT hub.\n```\n\n\u003c/details\u003e\n\n\u003cdetails open\u003e\n  \u003csummary\u003eDevice Update for IoT Hub\u003c/summary\u003e\n\n```text\n$ az iot du -h\n\nGroup\n    az iot du : Device Update for IoT Hub is a service that enables you to deploy over-the-air\n    updates (OTA) for your IoT devices.\n        As organizations look to further enable productivity and operational efficiency, Internet of\n        Things (IoT) solutions continue to be adopted at increasing rates. This makes it essential\n        that the devices forming these solutions are built on a foundation of reliability and\n        security and are easy to connect and manage at scale. Device Update for IoT Hub is an end-\n        to-end platform that customers can use to publish, distribute, and manage over-the-air\n        updates for everything from tiny sensors to gateway-level devices.\n        To learn more about the Device Update for IoT Hub service visit\n        https://learn.microsoft.com/en-us/azure/iot-hub-device-update/.\n\nSubgroups:\n    account  : Device Update account management.\n    device   : Device Update device management.\n    instance : Device Update instance management.\n    update   : Device Update update management.\n```\n\n\u003c/details\u003e\n\n## Scenario Automation\n\nPlease refer to the [Scenario Automation](docs/scenario-automation.md) page for examples of how to use the IoT extension in scripts.\n\n## Contributing\n\nPlease refer to the [Contributing](CONTRIBUTING.md) page for developer setup instructions and contribution guidelines.\n\n## Feedback\n\nWe are constantly improving and are always open to new functionality or enhancement ideas. Submit your feedback in the project [issues](https://github.com/Azure/azure-iot-cli-extension/issues).\n\n## Code of Conduct\n\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).\nFor more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or\ncontact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazure%2Fazure-iot-cli-extension","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fazure%2Fazure-iot-cli-extension","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazure%2Fazure-iot-cli-extension/lists"}