You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/iot-hub/create-connect-device.md
+11-21Lines changed: 11 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,8 @@ Create a device identity for your device to connect to Azure IoT Hub. This artic
18
18
19
19
* An IoT hub in your subscription. If you don't have an IoT hub, follow the steps in [Create an IoT hub](./iot-hub-create-through-portal.md)
20
20
21
+
* Depending on which tool you use, either have access to the [Azure portal](https://portal.azure.com) or [install the Azure CLI](/cli/azure/install-azure-cli).
22
+
21
23
## Register a device
22
24
23
25
In this section, you create a device identity in the [identity registry in your IoT hub](./iot-hub-devguide-identity-registry.md). A device can't connect to a hub unless it has a device identity.
@@ -26,7 +28,7 @@ The IoT Hub identity registry only stores device identities to enable secure acc
26
28
27
29
When you register a device, you choose its authentication method. IoT Hub supports three methods for device authentication:
28
30
29
-
***Symmetric key** - *This option is recommended for quickstart scenarios.*
31
+
***Symmetric key** - *This option is easiest for quickstart scenarios.*
30
32
31
33
When you register a device, you can provide keys or IoT Hub will generate keys for you. Both the device and the IoT hub have a copy of the symmetric key that can be compared when the device connects.
32
34
@@ -36,7 +38,7 @@ When you register a device, you choose its authentication method. IoT Hub suppor
36
38
37
39
***X.509 CA signed** - *This option is recommended for production scenarios.*
38
40
39
-
If your device has a CA-signed X.509 certificate, then you can give IoT Hub a root or intermediate certificate in the signing chain for authentication. Before you register a device, you upload and verify an X.509 certificate authority (CA) certificate to the IoT hub. The device has an X.509 certificate with the verified X.509 CA in its certificate chain of trust. When the device connects, it presents its full certificate chain and the IoT hub can validate it because it knows the X.509 CA. Multiple devices can authenticate against the same verified X.509 CA. For more information, see [Authenticate identities with X.509 certificates](./authenticate-authorize-x509.md).
41
+
If your device has a CA-signed X.509 certificate, then you upload a root or intermediate certificate authority (CA) certificate in the signing chain to IoT Hub before you register the device.The device has an X.509 certificate with the verified X.509 CA in its certificate chain of trust. When the device connects, it presents its full certificate chain and the IoT hub can validate it because it knows the X.509 CA. Multiple devices can authenticate against the same verified X.509 CA. For more information, see [Authenticate identities with X.509 certificates](./authenticate-authorize-x509.md).
40
42
41
43
### Prepare certificates
42
44
@@ -62,8 +64,6 @@ Create a device identity in your IoT hub.
62
64
63
65
1. Select **Add Device** to add a device in your IoT hub.
64
66
65
-
<!-- :::image type="content" source="./media/iot-hub-include-create-device/create-identity-portal.png" alt-text="Screen capture that shows how to create a device identity in the portal." border="true"::: -->
66
-
67
67
1. In **Create a device**, provide the information for your new device identity:
68
68
69
69
| Parameter | Dependent parameter | Value |
@@ -125,8 +125,6 @@ The Azure portal only lists connection strings for devices that use symmetric ke
125
125
126
126
By default, the keys and connection strings are masked because they're sensitive information. If you click the eye icon, they're revealed. It's not necessary to reveal them to copy them with the copy button.
127
127
128
-
<!-- :::image type="content" source="./media/iot-hub-include-create-device/device-details.png" alt-text="Screen capture that shows the device connection string." border="true" lightbox="./media/iot-hub-include-create-device/device-details.png"::: -->
129
-
130
128
### [Azure CLI](#tab/cli)
131
129
132
130
Use the [az iot hub device-identity connection-string show](/cli/azure/iot/hub/device-identity#az-iot-hub-device-identity-connection-string-show) command to retrieve a device's connection string. For example:
@@ -143,19 +141,17 @@ If you want to keep a device in your IoT hub's identity registry, but want to pr
143
141
144
142
### [Azure portal](#tab/portal)
145
143
146
-
. In the [Azure portal](https://portal.azure.com), navigate to your IoT hub.
144
+
1. In the [Azure portal](https://portal.azure.com), navigate to your IoT hub.
147
145
148
146
1. Select **Device management** > **Devices**.
149
147
150
148
1. Select your device from the list in the **Devices** pane.
151
149
152
-
1. On the device details page, set the **Enable connection to IoT Hub** parameter to **Disable**.
150
+
1. On the device details page, you can disable or delete the device registration.
153
151
154
-
:::image type="content" source="./media/iot-hub-create-through-portal/disable-device.png" alt-text="Screenshot that shows disabling a device connection.":::
152
+
* To prevent a device from connecting, set the **Enable connection to IoT Hub** parameter to **Disable**.
155
153
156
-
If you want to remove a device from your IoT hub's identity registry, you can delete its registration by selecting **Delete**.
157
-
158
-
:::image type="content" source="./media/iot-hub-create-through-portal/delete-device.png" alt-text="Screenshot that shows deleting a device.":::
154
+
* To completely remove a device from your IoT hub's identity registry, select **Delete**.
You can use other tools or interfaces to manage the IoT Hub identity registry, including:
179
175
180
-
* PowerShell commands
181
-
182
-
Refer to the [Az.IotHub](/powershell/module/az.iothub/) command set to learn how to manage device identities.
183
-
184
-
* Visual Studio Code
185
-
186
-
The [Azure IoT Hub extension for Visual Studio Code](./reference-iot-hub-extension.md) includes identity registry capabilities.
176
+
***PowerShell commands**: Refer to the [Az.IotHub](/powershell/module/az.iothub/) command set to learn how to manage device identities.
187
177
188
-
*REST API
178
+
***Visual Studio Code**: The [Azure IoT Hub extension for Visual Studio Code](./reference-iot-hub-extension.md) includes identity registry capabilities.
189
179
190
-
Refer to the [IoT Hub Service APIs](/rest/api/iothub/service/devices) to learn how to manage device identities.
180
+
***REST API**: Refer to the [IoT Hub Service APIs](/rest/api/iothub/service/devices) to learn how to manage device identities.
0 commit comments