Skip to content

Commit 3c27f59

Browse files
authored
Merge pull request #177436 from v-gpettibone/pics15
Updating pics for configuring managed identities
2 parents 5189274 + e6eb6a3 commit 3c27f59

File tree

6 files changed

+23
-19
lines changed

6 files changed

+23
-19
lines changed

articles/iot-hub/iot-hub-managed-identity.md

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,21 @@ Managed identities provide Azure services with an automatically managed identity
1616
In IoT Hub, managed identities can be used for egress connectivity from IoT Hub to other Azure services for features such as [message routing](iot-hub-devguide-messages-d2c.md), [file upload](iot-hub-devguide-file-upload.md), and [bulk device import/export](iot-hub-bulk-identity-mgmt.md). In this article, you learn how to use system-assigned and user-assigned managed identities in your IoT hub for different functionalities.
1717

1818
## Prerequisites
19+
1920
- Read the documentation of [managed identities for Azure resources](./../active-directory/managed-identities-azure-resources/overview.md) to understand the differences between system-assigned and user-assigned managed identity.
2021

2122
- If you don’t have an IoT hub, [create one](iot-hub-create-through-portal.md) before continuing.
2223

2324
## System-assigned managed identity
2425

2526
### Add and remove a system-assigned managed identity in Azure portal
26-
1. Sign in to the Azure portal and navigate to your desired IoT hub.
27-
2. Navigate to **Identity** in your IoT Hub portal
28-
3. Under **System-assigned** tab, select **On** and click **Save**.
29-
4. To remove system-assigned managed identity from an IoT hub, select **Off** and click **Save**.
3027

31-
:::image type="content" source="./media/iot-hub-managed-identity/system-assigned.png" alt-text="Screenshot showing where to turn on system-assigned managed identity for an IoT hub":::
28+
1. Sign in to the Azure portal and navigate to your desired IoT hub.
29+
2. Navigate to **Identity** in your IoT Hub portal
30+
3. Under **System-assigned** tab, select **On** and click **Save**.
31+
4. To remove system-assigned managed identity from an IoT hub, select **Off** and click **Save**.
32+
33+
:::image type="content" source="./media/iot-hub-managed-identity/system-assigned.png" alt-text="Screenshot showing where to turn on system-assigned managed identity for an I O T hub.":::
3234

3335
### Enable system-assigned managed identity at hub creation time using ARM template
3436

@@ -112,14 +114,17 @@ After the resource is created, you can retrieve the system-assigned assigned to
112114
```azurecli-interactive
113115
az resource show --resource-type Microsoft.Devices/IotHubs --name <iot-hub-resource-name> --resource-group <resource-group-name>
114116
```
115-
## User-assigned managed identity
117+
118+
## User-assigned managed identity
119+
116120
In this section, you learn how to add and remove a user-assigned managed identity from an IoT hub using Azure portal.
117-
1. First you need to create a user-assigned managed identity as a standalone resource. To do so, you can follow the instructions in [Create a user-assigned managed identity](./../active-directory/managed-identities-azure-resources/how-manage-user-assigned-managed-identities.md#create-a-user-assigned-managed-identity).
118-
2. Go to your IoT hub, navigate to the **Identity** in the IoT Hub portal.
119-
3. Under **User-Assigned** tab, click **Associate a user-assigned managed identity**. Choose the user-assigned managed identity you want to add to your hub and then click **Select**.
120-
4. You can remove a user-assigned identity from an IoT hub. Choose the user-assigned identity you want to remove, and click **Remove** button. Note you are only removing it from IoT hub, and this removal does not delete the user-assigned identity as a resource. To delete the user-assigned identity as a resource, follow the instructions in [Delete a user-assigned managed identity](./../active-directory/managed-identities-azure-resources/how-manage-user-assigned-managed-identities.md#delete-a-user-assigned-managed-identity).
121121

122-
:::image type="content" source="./media/iot-hub-managed-identity/user-assigned.png" alt-text="Screenshot showing how to add user-assigned managed identity for an IoT hub":::
122+
1. First you need to create a user-assigned managed identity as a standalone resource. To do so, you can follow the instructions in [Create a user-assigned managed identity](./../active-directory/managed-identities-azure-resources/how-manage-user-assigned-managed-identities.md#create-a-user-assigned-managed-identity).
123+
2. Go to your IoT hub, navigate to the **Identity** in the IoT Hub portal.
124+
3. Under **User-Assigned** tab, click **Associate a user-assigned managed identity**. Choose the user-assigned managed identity you want to add to your hub and then click **Select**.
125+
4. You can remove a user-assigned identity from an IoT hub. Choose the user-assigned identity you want to remove, and click **Remove** button. Note you are only removing it from IoT hub, and this removal does not delete the user-assigned identity as a resource. To delete the user-assigned identity as a resource, follow the instructions in [Delete a user-assigned managed identity](./../active-directory/managed-identities-azure-resources/how-manage-user-assigned-managed-identities.md#delete-a-user-assigned-managed-identity).
126+
127+
:::image type="content" source="./media/iot-hub-managed-identity/user-assigned.png" alt-text="Screenshot showing how to add user-assigned managed identity for an I O T hub.":::
123128

124129
### Enable user-assigned managed identity at hub creation time using ARM template
125130

@@ -236,11 +241,11 @@ In this section, we use the [message routing](iot-hub-devguide-messages-d2c.md)
236241
237242
3. For user-assigned, choose **User-assigned managed identity** under **Assign access to**. Select your subscription and your user-assigned managed identity in the drop-down list. Click the **Save** button.
238243

239-
:::image type="content" source="./media/iot-hub-managed-identity/eventhub-iam-user-assigned.png" alt-text="IoT Hub message routing with user assigned":::
244+
:::image type="content" source="./media/iot-hub-managed-identity/eventhub-iam-user-assigned.png" alt-text="Screenshot that shows message routing with user assigned.":::
240245

241246
4. For system-assigned, under **Assign access to** choose **User, group, or service principal** and select your IoT Hub's resource name in the drop-down list. Click **Save**.
242247

243-
:::image type="content" source="./media/iot-hub-managed-identity/eventhub-iam-system-assigned.png" alt-text="IoT Hub message routing with system assigned":::
248+
:::image type="content" source="./media/iot-hub-managed-identity/eventhub-iam-system-assigned.png" alt-text="Screenshot that shows message routing with system assigned.":::
244249

245250
If you need to restrict the connectivity to your custom endpoint through a VNet, you need to turn on the trusted Microsoft first party exception, to give your IoT hub access to the specific endpoint. For example, if you're adding an event hub custom endpoint, navigate to the **Firewalls and virtual networks** tab in your event hub and enable **Allow access from selected networks** option. Under the **Exceptions** list, check the box for **Allow trusted Microsoft services to access event hubs**. Click the **Save** button. This also applies to storage account and service bus. Learn more about [IoT Hub support for virtual networks](./virtual-network-support.md).
246251

@@ -251,12 +256,11 @@ In this section, we use the [message routing](iot-hub-devguide-messages-d2c.md)
251256

252257
6. At the bottom of the page, choose your preferred **Authentication type**. In this section, we use the **User-Assigned** as the example. In the dropdown, select the preferred user-assigned managed identity then click **Create**.
253258

254-
:::image type="content" source="./media/iot-hub-managed-identity/eventhub-routing-endpoint.png" alt-text="IoT Hub event hub with user assigned":::
259+
:::image type="content" source="./media/iot-hub-managed-identity/eventhub-routing-endpoint.png" alt-text="Screenshot that shows event hub with user assigned.":::
255260

256-
7. Custom endpoint successfully created.
257-
8. After creation, you can still change the authentication type. Select the custom endpoint that you want to change the authentication type, then click **Change authentication type**.
261+
7. Custom endpoint successfully created.
258262

259-
:::image type="content" source="./media/iot-hub-managed-identity/change-authentication-type.png" alt-text="IoT Hub authentication type":::
263+
8. After creation, you can still change the authentication type. Select **Message routing** in the left navigation pane and then **Custom endpoints**. Select the custom endpoint for which you want to change the authentication type and then click **Change authentication type**.
260264

261265
9. Choose the new authentication type to be updated for this endpoint, click **Save**.
262266

@@ -276,7 +280,7 @@ IoT Hub's [file upload](iot-hub-devguide-file-upload.md) feature allows devices
276280
5. On your IoT hub's resource page, navigate to **File upload** tab.
277281
6. On the page that shows up, select the container that you intend to use in your blob storage, configure the **File notification settings, SAS TTL, Default TTL, and Maximum delivery count** as desired. Choose the preferred authentication type, and click **Save**. If you get an error at this step, temporarily set your storage account to allow access from **All networks**, then try again. You can configure firewall on the storage account once the File upload configuration is complete.
278282

279-
:::image type="content" source="./media/iot-hub-managed-identity/file-upload.png" alt-text="IoT Hub file upload with msi":::
283+
:::image type="content" source="./media/iot-hub-managed-identity/file-upload.png" alt-text="Screen shot that shows file upload with msi.":::
280284

281285
> [!NOTE]
282286
> In the file upload scenario, both hub and your device need to connect with your storage account. The steps above are for connecting your IoT hub to your storage account with desired authentication type. You still need to connect your device to storage using the SAS URI. Today the SAS URI is generated using connection string. We'll add support to generate SAS URI with managed identity soon. Please follow the steps in [file upload](iot-hub-devguide-file-upload.md).
@@ -381,4 +385,4 @@ Use the links below to learn more about IoT Hub features:
381385

382386
* [Message routing](./iot-hub-devguide-messages-d2c.md)
383387
* [File upload](./iot-hub-devguide-file-upload.md)
384-
* [Bulk device import/export](./iot-hub-bulk-identity-mgmt.md)
388+
* [Bulk device import/export](./iot-hub-bulk-identity-mgmt.md)
-19.9 KB
Loading
-20.3 KB
Loading
-140 KB
Loading
-178 KB
Loading
2.37 KB
Loading

0 commit comments

Comments
 (0)