0

I have a device that is provisioned using the Azure IoT Device Provisioning Service. So far so good.

Now, I want to update a device's desired properties from one of my Azure App Service. I have the connection string to my provisioning service and, using the registration ID of the device, I can get the assigned IoT Hub host name.

However, at this point, I do not have access the connection string of the IoT Hub. The solutions I have found so far to update the device twin requires knowing the IoT Hub's connection string (host name and a shared key).

I could implement a service that could somehow keep a mapping of all the hubs' connection strings and return the connection string depending on the host name however I find this a bit cumbersome and prone to errors.

Question

Is there a way to only communicate with the IoT Device Provisioning Service to get access to the IoT Hub without having to keep track of the IoT Hubs' connecting strings? If not, then what would be the recommended approach?

Kzryzstof
  • 7,688
  • 10
  • 61
  • 108
  • how about using the Automatic Device Management for your IoT Hub? Your provisioned device will be automatically configured based on the IoT device configuration setup (Device Twin Configuration). – Roman Kiss May 28 '20 at 13:24
  • The device has been provisioned but I would like to change the desired properties afterwards... – Kzryzstof May 28 '20 at 14:10

0 Answers0