Create Pull Request
| Date | Scan | Status | Result |
|---|---|---|---|
| 2026-01-14 00:00 | #250 | in_progress |
Biased
|
| 2026-01-13 00:00 | #246 | completed |
Biased
|
| 2026-01-11 00:00 | #240 | completed |
Biased
|
| 2026-01-10 00:00 | #237 | completed |
Biased
|
| 2026-01-09 00:34 | #234 | completed |
Biased
|
| 2026-01-08 00:53 | #231 | completed |
Biased
|
| 2026-01-06 18:15 | #225 | cancelled |
Clean
|
| 2025-08-17 00:01 | #83 | cancelled |
Clean
|
| 2025-07-13 21:37 | #48 | completed |
Biased
|
| 2025-07-12 23:44 | #41 | cancelled |
Biased
|
| 2025-07-09 13:09 | #3 | cancelled |
Clean
|
| 2025-07-08 04:23 | #2 | cancelled |
Biased
|
>[!TIP]
>If you're using PowerShell, add a backslash `\` to escape any double quotes. For example: `--tags '{\"country\":\"US\"}'`.
---
## Query for device twins
IoT Hub exposes the device twins for your IoT hub as a document collection called **devices**. You can query devices based on their device twin values.
This section describes how to run twin queries in the Azure portal and Azure CLI. To learn how to write twin queries, see [Queries for IoT Hub device and module twins](./query-twins.md).
### [Azure portal](#tab/portal)
1. In the [Azure portal](https://portal.azure.com), navigate to your IoT hub.
1. In your IoT hub, select **Devices** from the **Device management** section of the navigation menu.
1. You can either use a filter or a query to find devices based on their device twin details:
* **Find devices using a filter**:
1. Finding devices using a filter is the default view in the Azure portal. If you don't see these fields, select **Find devices using a filter**.
1. Select **Add filter**, and then select **Device tag** as the filter type from the drop-down menu.
1. Enter the desired tag name and value, select **Apply** to retrieve the list of devices that matches the criteria.
:::image type="content" source="./media/manage-device-twins/filter-device-twin-tags.png" alt-text="Screenshot of filtering devices with tags.":::
* **Find devices using a query**:
1. Select **Find devices using a query**.
1. Enter your query into the text box, then select **Run query**.
:::image type="content" source="./media/manage-device-twins/run-query.png" alt-text="Screenshot that shows using the device query filter in the Azure portal.":::
### [Azure CLI](#tab/cli)
Use the [az iot hub query](/cli/azure/iot/hub#az-iot-hub-query) command to return device information based on device twin or module twin queries.