Skip to content

Commit beb9b59

Browse files
committed
fixing format
1 parent f1f241a commit beb9b59

File tree

2 files changed

+10
-77
lines changed

2 files changed

+10
-77
lines changed

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

Lines changed: 9 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -32,81 +32,13 @@ In IoT Hub, managed identities can be used for egress connectivity from IoT Hub
3232

3333
![IoT Hub system assigned](./media/iot-hub-managed-identity/system-assigned.png)
3434

35-
### Enable managed identity at hub creation time using ARM template
3635

37-
To enable the system-assigned managed identity in your IoT hub at resource provisioning time, use the ARM template below. This ARM template has two required resources, and they both need to be deployed before creating other resources like `Microsoft.Devices/IotHubs/eventHubEndpoints/ConsumerGroups`.
38-
39-
```json
40-
{
41-
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
42-
"contentVersion": "1.0.0.0",
43-
"resources": [
44-
{
45-
"type": "Microsoft.Devices/IotHubs",
46-
"apiVersion": "2020-03-01",
47-
"name": "<provide-a-valid-resource-name>",
48-
"location": "<any-of-supported-regions>",
49-
"identity": {
50-
"type": "SystemAssigned"
51-
},
52-
"sku": {
53-
"name": "<your-hubs-SKU-name>",
54-
"tier": "<your-hubs-SKU-tier>",
55-
"capacity": 1
56-
}
57-
},
58-
{
59-
"type": "Microsoft.Resources/deployments",
60-
"apiVersion": "2018-02-01",
61-
"name": "createIotHub",
62-
"dependsOn": [
63-
"[resourceId('Microsoft.Devices/IotHubs', '<provide-a-valid-resource-name>')]"
64-
],
65-
"properties": {
66-
"mode": "Incremental",
67-
"template": {
68-
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
69-
"contentVersion": "0.9.0.0",
70-
"resources": [
71-
{
72-
"type": "Microsoft.Devices/IotHubs",
73-
"apiVersion": "2020-03-01",
74-
"name": "<provide-a-valid-resource-name>",
75-
"location": "<any-of-supported-regions>",
76-
"identity": {
77-
"type": "SystemAssigned"
78-
},
79-
"sku": {
80-
"name": "<your-hubs-SKU-name>",
81-
"tier": "<your-hubs-SKU-tier>",
82-
"capacity": 1
83-
}
84-
}
85-
]
86-
}
87-
}
88-
}
89-
]
90-
}
91-
```
92-
93-
After substituting the values for your resource `name`, `location`, `SKU.name` and `SKU.tier`, you can use Azure CLI to deploy the resource in an existing resource group using:
94-
95-
```azurecli-interactive
96-
az deployment group create --name <deployment-name> --resource-group <resource-group-name> --template-file <template-file.json>
97-
```
98-
99-
After the resource is created, you can retrieve the managed service identity assigned to your hub using Azure CLI:
100-
101-
```azurecli-interactive
102-
az resource show --resource-type Microsoft.Devices/IotHubs --name <iot-hub-resource-name> --resource-group <resource-group-name>
103-
```
10436
## User-assigned managed identity
10537
In this section, you learn how to add and remove a user-assigned managed identity from an IoT Hub using Azure Portal.
106-
1. First you need to create a user-assigned managed identity as a standalone resource. You can follow the instructions [here](./../active-directory/managed-identities-azure-resources/how-to-manage-ua-identity-portal) to create a user-assigned managed identity.
38+
1. First you need to create a user-assigned managed identity as a standalone resource. You can follow the instructions [here](./../active-directory/managed-identities-azure-resources/how-to-manage-ua-identity-portal.md#create-a-user-assigned-managed-identity) to create a user-assigned managed identity.
10739
2. Go to your IoT Hub, navigate to the **Identity** in your IoT Hub portal.
10840
3. Under **User-Assigned** tab, click **Add user-assigned managed identity**. Choose the user-assigned managed identity you want to add to IoT Hub and then click **Select**.
109-
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 does not delete the user-assigned identity as a resource. To delete the user-assigned identity as a resource, follow the instructions [here](./../active-directory/managed-identities-azure-resources/how-to-manage-ua-identity-portal).
41+
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 does not delete the user-assigned identity as a resource. To delete the user-assigned identity as a resource, follow the instructions [here](./../active-directory/managed-identities-azure-resources/how-to-manage-ua-identity-portal.md#delete-a-user-assigned-managed-identity).
11042

11143
![IoT Hub user assigned](./media/iot-hub-managed-identity/user-assigned.png)
11244

@@ -116,12 +48,13 @@ In IoT Hub, managed identities can be used for egress connectivity from IoT Hub
11648
### Message routing
11749
In this section we use the [message routing](iot-hub-devguide-messages-d2c) to event hub custom endpoint as an example. The same thing applies to other routing custom endpoints.
11850

119-
1. First we need to go to your event hub in Azure portal, to assign the managed identity the right access.
120-
2. In your event hub, navigate to the **Access control (IAM)** tab and click **Add** then **Add a role assignment**.
51+
1. First we need to go to your event hub in Azure portal, to assign the managed identity the right access. In your event hub, navigate to the **Access control (IAM)** tab and click **Add** then **Add a role assignment**.
12152
3. Select **Event Hubs Data Sender as role**.
122-
> [!NOTE] For storage account, select **Storage Blob Data Contributor** ([*not* Contributor or Storage Account Contributor](../storage/common/storage-auth-aad-rbac-portal.md#azure-roles-for-blobs-and-queues)) as **role**. For service bus, select **Service bus Data Sender** as **role**.
12353

124-
4. 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.
54+
> [!NOTE]
55+
> For storage account, select **Storage Blob Data Contributor** ([*not* Contributor or Storage Account Contributor](../storage/common/storage-auth-aad-rbac-portal.md#azure-roles-for-blobs-and-queues)) as **role**. For service bus, select **Service bus Data Sender** as **role**.
56+
57+
4. 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.
12558

12659
![IoT Hub message routing with user assigned](./media/iot-hub-managed-identity/eventhub-iam-user-assigned.png)
12760

@@ -131,10 +64,10 @@ In this section we use the [message routing](iot-hub-devguide-messages-d2c) to e
13164

13265

13366
> [!NOTE]
134-
> You need to complete above steps to assign the managed identity the right access before adding the event hub as a custom endpoint in IoT Hub using the managed identity. Please wait a few minutes for the role assignment to propagate.
67+
> You need to complete above steps to assign the managed identity the right access before adding the event hub as a custom endpoint in IoT Hub. Please wait a few minutes for the role assignment to propagate.
13568
13669
6. Next, go to your IoT Hub. In your Hub, navigate to **Message Routing**, then click **Custom endpoints**. Click **Add** and choose the type of endpoint you would like to use. In this section, we use event hub as the example.
137-
7. 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**.
70+
7. 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**.
13871

13972
![IoT Hub event hub with user assigned](./media/iot-hub-managed-identity/eventhub-routing-endpoint.png)
14073

articles/iot-hub/virtual-network-support.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ For pricing details, see [Azure Private Link pricing](https://azure.microsoft.co
7878

7979
IoT Hub can connect to your Azure blob storage, event hub, service bus resources for [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) over the resources' public endpoint. Binding your resource to a VNet blocks connectivity to the resource by default. As a result, this configuration prevents IoT Hub's from working sending data to your resources. To fix this issue, enable connectivity from your IoT Hub resource to your storage account, event hub, or service bus resources via the **trusted Microsoft service** option.
8080

81-
To allow other services to find your IoT hub as a trusted Microsoft service, it must have a managed identity. Once a managed identity is provisioned, you need to grant the Azure RBAC permission to your hub's managed identity to access your custom endpoint.
81+
To allow other services to find your IoT hub as a trusted Microsoft service, your hub must use the managed identity. Once a managed identity is provisioned, you need to grant the Azure RBAC permission to your hub's managed identity to access your custom endpoint.
8282

8383

8484
1. Follow the article [Managed identities support in IoT Hub](./iot-hub-managed-identity.md) to provision a managed identity, grant the Azure RBAC permission, and add the custom endpoint to your IoT Hub.

0 commit comments

Comments
 (0)