Search code examples
azureazure-functionsazure-logic-appsazure-iot-hubazure-iot-suite

How to catch Device Provisioning Event with Azure Logic App?


I'm trying to implement a list of events with Azure IoT Suite:

  • My device connects to the IoT Hub the first time with the device provisioning service;
  • The device provisioning registers correctly the device and set the device twin;
  • An Azure Logic App catchs this event and starts an Azure Function with a code C# to communicate cloud-to-device to this new device. (I would like to set some new parameters).

Is it possible the point number 3? I'm looking to the actions of the Azure Logic App but I don't find anything. Otherwise, anyone known other alternatives?

Thanks a lot for the suggestions!


Solution

  • You can use Event Grid for this:

    1. IoT Hub emits Device Created events (plus other events) and sends them to Event Grid
    2. Logic App is triggered by new events from the Grid.
    3. Your Logic App is doing your custom magic :)

    If your logic app is doing nothing else apart from invoking the Function, your Function could also directly being invoked by the Event Grid.