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-dps/how-to-use-custom-allocation-policies.md
+37-35
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ manager: timlt
14
14
# How to use custom allocation policies
15
15
16
16
17
-
A custom allocation policy gives you more control over how devices are assigned to an IoT hub. This is accomplished by using custom code in an [Azure Function](../azure-functions/functions-overview.md) to assign devices to an IoT hub. The device provisioning service calls your Azure Function code providing the IoT hub group. Your function code returns the IoT hub information for provisioning the device.
17
+
A custom allocation policy gives you more control over how devices are assigned to an IoT hub. This is accomplished by using custom code in an [Azure Function](../azure-functions/functions-overview.md) to assign devices to an IoT hub. The device provisioning service calls your Azure Function code providing all relevant information about the device and the enrollment. Your function code is executed and returns the IoT hub information used to provisioning the device.
18
18
19
19
By using custom allocation policies you define your own allocation policies when the policies provided by the Device Provisioning Service do not meet the requirements of your scenario.
20
20
@@ -103,7 +103,9 @@ In this section, you will create a new enrollment group that uses the custom all
103
103

104
104
105
105
106
-
4. On **Add Enrollment Group**, click **Link a new IoT hub** to link both of your new divisional IoT hubs.
106
+
4. On **Add Enrollment Group**, click **Link a new IoT hub** to link both of your new divisional IoT hubs.
107
+
108
+
You must execute this step for both of your divisional IoT hubs.
107
109
108
110
**Subscription**: If you have multiple subscriptions, choose the subscription where you created the divisional IoT hubs.
109
111
@@ -274,9 +276,9 @@ In this section, you will create a new enrollment group that uses the custom all
274
276
275
277
In this section, you will create two unique device keys. One key will be used for a simulated toaster device. The other key will be used for a simulated heat pump device.
276
278
277
-
To generate the device key, use the **Primary Key** you noted earlier to compute the [HMAC-SHA256](https://wikipedia.org/wiki/HMAC) of the device registration ID for each device and convert the result into Base64 format.
279
+
To generate the device key, you will use the **Primary Key** you noted earlier to compute the [HMAC-SHA256](https://wikipedia.org/wiki/HMAC) of the device registration ID for each device and convert the result into Base64 format. For more information on creating derived device keys with enrollment groups, see the group enrollments section of [Symmetric key attestation](concepts-symmetric-key-attestation.md).
278
280
279
-
Use the following two device registration IDs and compute a device key for both devices. Both registration IDs have a valid suffix to work with the example code for the custom allocation policy:
281
+
For the example in this article, use the following two device registration IDs and compute a device key for both devices. Both registration IDs have a valid suffix to work with the example code for the custom allocation policy:
280
282
281
283
- **breakroom499-contoso-tstrsd-007**
282
284
- **mainbuilding167-contoso-hpsd-088**
@@ -285,53 +287,53 @@ Use the following two device registration IDs and compute a device key for both
285
287
286
288
If you are using a Linux workstation, you can use openssl to generate your derived device keys as shown in the following example.
287
289
288
-
Replace the value of **KEY** with the **Primary Key** you noted earlier.
290
+
1. Replace the value of **KEY** with the **Primary Key** you noted earlier.
0 commit comments