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/digital-twins/how-to-provision-using-device-provisioning-service.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ titleSuffix: Azure Digital Twins
5
5
description: Learn how to set up an automated process to provision and retire IoT devices in Azure Digital Twins using Device Provisioning Service (DPS).
6
6
author: baanders
7
7
ms.author: baanders # Microsoft employees only
8
-
ms.date: 06/21/2022
8
+
ms.date: 11/18/2022
9
9
ms.topic: how-to
10
10
ms.service: digital-twins
11
11
@@ -36,7 +36,7 @@ This sample also uses a *device simulator* that includes provisioning using the
36
36
37
37
Unzip the downloaded folder.
38
38
39
-
You'll need [Node.js](https://nodejs.org/download) installed on your machine. The device simulator is based on Node.js, version 10.0.x or later.
39
+
You'll need [Node.js](https://nodejs.org) installed on your machine. The device simulator is based on Node.js, version 10.0.x or later.
40
40
41
41
## Solution architecture
42
42
@@ -110,19 +110,19 @@ Next, you'll need to create an enrollment in Device Provisioning Service using a
110
110
While going through that flow, make sure you select the following options to link the enrollment to the function you created.
111
111
112
112
***Select how you want to assign devices to hubs**: Custom (Use Azure Function).
113
-
***Select the IoT hubs this group can be assigned to:** Choose your IoT hub name or select the **Link a new IoT hub** button, and choose your IoT hub from the dropdown.
113
+
***Select the IoT hubs this group can be assigned to:** Choose your IoT hub name or select the **Link a new IoT hub** button, and choose your IoT hub from the options.
114
114
115
115
Next, choose the **Select a new function** button to link your function app to the enrollment group. Then, fill in the following values:
116
116
117
117
***Subscription**: Your Azure subscription is autopopulated. Make sure it's the right subscription.
118
118
***Function App**: Choose your function app name.
119
-
***Function**: Choose DpsAdtAllocationFunc.
119
+
***Function**: Choose *DpsAdtAllocationFunc*.
120
120
121
121
Save your details.
122
122
123
123
:::image type="content" source="media/how-to-provision-using-device-provisioning-service/link-enrollment-group-to-iot-hub-and-function-app.png" alt-text="Screenshot of the Customs enrollment group details window in the Azure portal." lightbox="media/how-to-provision-using-device-provisioning-service/link-enrollment-group-to-iot-hub-and-function-app.png":::
124
124
125
-
After creating the enrollment, the **Primary Key** for the enrollmentwill be used later to configure the device simulator for this article.
125
+
After creating the enrollment, select it to view its settings. Copy the **Primary Key** for the enrollment, which will be used later in this article to configure the device simulator.
126
126
127
127
### Set up the device simulator
128
128
@@ -138,7 +138,7 @@ For more information about models, see [Manage models](how-to-manage-model.md#up
138
138
139
139
#### Configure and run the simulator
140
140
141
-
In your command window, navigate to the downloaded sample *Azure Digital Twins and IoT Hub Integration* that you unzipped earlier, and then into the *device-simulator* directory. Next, install the dependencies for the project using the following command:
141
+
In a command window on your local machine, navigate to the downloaded sample *Azure Digital Twins and IoT Hub Integration* that you unzipped earlier, and then into the *device-simulator* directory. Next, install the dependencies for the project using the following command:
Copy file name to clipboardExpand all lines: includes/digital-twins-configure-function-app-cli.md
+2-11Lines changed: 2 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,21 +15,12 @@ Run the following commands in [Azure Cloud Shell](https://shell.azure.com) or a
15
15
16
16
The Azure function requires a bearer token to be passed to it. To make sure the bearer token is passed, grant the function app the **Azure Digital Twins Data Owner** role for your Azure Digital Twins instance, which will give the function app permission to perform data plane activities on the instance.
17
17
18
-
1. Use the following command to see the details of your function's [system-managed identity](../articles/active-directory/managed-identities-azure-resources/overview.md). Take note of the `principalId` field in the output. You'll use this ID to refer to the function so that you can grant it permissions in the next step.
18
+
1. Use the following command to create a [system-managed identity](../articles/active-directory/managed-identities-azure-resources/overview.md) for your function (if the function already has one, this command will print its details). Take note of the `principalId` field in the output. You'll use this ID to refer to the function so that you can grant it permissions in the next step.
19
19
20
20
```azurecli-interactive
21
-
az functionapp identity show --resource-group <your-resource-group> --name <your-function-app-name>
21
+
az functionapp identity assign --resource-group <your-resource-group> --name <your-function-app-name>
22
22
```
23
23
24
-
>[!NOTE]
25
-
> If the result is empty instead of showing identity details, create a new system-managed identity for the function by using this command:
> The output displays details of the identity, including the `principalId` value required for the next step.
32
-
33
24
1. Use the `principalId` value in the following command to give the function the **Azure Digital Twins Data Owner** role for your Azure Digital Twins instance.
0 commit comments