1

I am using custom allocation policy in device provisioning service (DPS) to register my iot device to iot hub, in which I am triggering azure function for the same.

Now if my function logic fails, I have to send the custom error message to a device, how would I do that? I know that we can send custom HTTP status code to the device in case of failure but I have to send some custom message along with that code.

1 Answers1

1

Support for this is on the radar of the Azure Device Provisioning Service. Please look for an update over the next two months.

Rajeev Vokkarne
  • 281
  • 1
  • 3
  • Thanks for answering, we'll eagerly waiting for it. – Anil Agrawal Apr 16 '19 at 05:11
  • 1
    We just announced support for this feature [here](https://azure.microsoft.com/en-us/updates/azure-iot-hub-device-provisioning-service-june-2019-update/). Just include a property called 'payload' in the response body with a JSON object as its value containing the error message. `{ "payload" : { "errorMessage" : "Encountered error xyz" } }` – Rajeev Vokkarne Aug 08 '19 at 22:42