Is the DPS Allocation Policy for IoT Central Customisable?

Jamie Fraser 5 Reputation points
2023-08-01T11:41:47.8+00:00

Hi All,

I am not an expert in MS Azure IoT Central, but my investigations into this issue are not proving successful; I would be grateful for some help.

My question is whether the DPS allocation policy for IoT Central is customisable in the same way that it is for IoT Hub?

I have read this article: https://learn.microsoft.com/en-us/azure/iot-dps/how-to-use-allocation-policies

but it is not clear to me whether this applies just to the optional use of a DPS instance with IoT Hub; or also with the mandatory use of DPS with IoT Central? I would like to be able to set a Custom or Static allocation policy with IoT Central; is it possible?

Thanks

Azure IoT Central
Azure IoT Central
An Azure hosted internet of things (IoT) application platform.
344 questions
Azure IoT Hub
Azure IoT Hub
An Azure service that enables bidirectional communication between internet of things (IoT) devices and applications.
1,120 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. LeelaRajeshSayana-MSFT 13,466 Reputation points
    2023-08-01T22:08:49.1966667+00:00

    Hi @Jamie Fraser Greetings! Welcome to Microsoft Q&A forum. Thank you for posting this question here.

    The policy names you see in the shared link are only meant to used when creating an Enrollment group in Azure DPS through Azure portal. But the limitation here is that the Enrollment group creation from the portal only allows DPS to be linked with Azure IoT Hub but not IoT Central. Please find the below image for reference.

    User's image

    However, as the documentation states, when setting the allocation policy using the DPS REST API, Azure CLI, and DPS service SDKs, they are referred to as follows: hashed, geolatency, static, and custom.

    You can use the Microsoft.Azure.Devices.Provisioning.Service Namespace and create a ProvisioningServiceClient class and use the AllocationPolicy Enum defined in the namespace to create a static/custom allocation policy for IoT Central. Here is a link to documentation where you can find the implementation of DPS service SDKs

    Kindly note that you would have to customize the samples provided in the GitHub repository and would need to create a custom solution that suits your needs. The Tutorial: Create and connect a client application to your Azure IoT Central application uses DPS device client to provision devices to IoT Central. You can modify the code to use DPS service client and test the custom allocation policies.

    Hope this helps.


    If the response helped, please do click Accept Answer and Yes for the answer provided. Doing so would help other community members with similar issue identify the solution. I highly appreciate your contribution to the community.