Skip to content

Commit 7807f0d

Browse files
authored
Merge pull request #196612 from PatAltimore/patricka-downstream
Fix CLI parameter setting parent device
2 parents 98c4281 + 1e40e8d commit 7807f0d

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

articles/iot-edge/how-to-authenticate-downstream-device.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: How to authenticate downstream devices or leaf devices to IoT Hub,
44
author: PatAltimore
55

66
ms.author: patricka
7-
ms.date: 10/15/2020
7+
ms.date: 04/29/2022
88
ms.topic: conceptual
99
ms.service: iot-edge
1010
services: iot-edge
@@ -74,9 +74,12 @@ When you create the new device identity, provide the following information:
7474
You also can use the [IoT extension for Azure CLI](https://github.com/Azure/azure-iot-cli-extension) to complete the same operation. The following example uses the [az iot hub device-identity](/cli/azure/iot/hub/device-identity) command to create a new IoT device with symmetric key authentication and assign a parent device:
7575

7676
```azurecli
77-
az iot hub device-identity create -n {iothub name} -d {new device ID} --pd {existing gateway device ID}
77+
az iot hub device-identity create -n {iothub name} -d {new device ID} --device-scope {deviceScope of parent device}
7878
```
7979

80+
> [!TIP]
81+
> You can list device properties including device scope using `az iot hub device-identity list --hub-name {iothub name}`.
82+
8083
Next, [Retrieve and modify the connection string](#retrieve-and-modify-connection-string) so that your device knows to connect via its gateway.
8184

8285
### X.509 self-signed authentication
@@ -129,9 +132,12 @@ For X.509 self-signed authentication, sometimes referred to as thumbprint authen
129132
You also can use the [IoT extension for Azure CLI](https://github.com/Azure/azure-iot-cli-extension) to complete the same device creation operation. The following example uses the [az iot hub device-identity](/cli/azure/iot/hub/device-identity) command to create a new IoT device with X.509 self-signed authentication and assigns a parent device:
130133
131134
```azurecli
132-
az iot hub device-identity create -n {iothub name} -d {device ID} --pd {gateway device ID} --am x509_thumbprint --ptp {primary thumbprint} --stp {secondary thumbprint}
135+
az iot hub device-identity create -n {iothub name} -d {device ID} --device-scope {deviceScope of gateway device} --am x509_thumbprint --ptp {primary thumbprint} --stp {secondary thumbprint}
133136
```
134137

138+
> [!TIP]
139+
> You can list device properties including device scope using `az iot hub device-identity list --hub-name {iothub name}`.
140+
135141
Next, [Retrieve and modify the connection string](#retrieve-and-modify-connection-string) so that your device knows to connect via its gateway.
136142

137143
### X.509 CA-signed authentication
@@ -173,9 +179,12 @@ This section is based on the IoT Hub X.509 certificate tutorial series. See [Und
173179
You also can use the [IoT extension for Azure CLI](https://github.com/Azure/azure-iot-cli-extension) to complete the same device creation operation. The following example uses the [az iot hub device-identity](/cli/azure/iot/hub/device-identity) command to create a new IoT device with X.509 CA signed authentication and assigns a parent device:
174180

175181
```azurecli
176-
az iot hub device-identity create -n {iothub name} -d {device ID} --pd {gateway device ID} --am x509_ca
182+
az iot hub device-identity create -n {iothub name} -d {device ID} --device-scope {deviceScope of gateway device} --am x509_ca
177183
```
178184

185+
> [!TIP]
186+
> You can list device properties including device scope using `az iot hub device-identity list --hub-name {iothub name}`.
187+
179188
Next, [Retrieve and modify the connection string](#retrieve-and-modify-connection-string) so that your device knows to connect via its gateway.
180189

181190
## Retrieve and modify connection string

0 commit comments

Comments
 (0)