Provisioning Certificates for IoT Devices

Roy 60 Reputation points
2025-06-18T11:28:25+00:00

I’m developing an IoT device system and facing the challenge of certificate provisioning. I want to implement a provisioning system that runs on the device’s first connection to the internet. We plan to use MQTT for device-to-cloud communication.

I found that Azure DPS can generate certificates, but its usage is limited to Azure IoT Hub. Additionally, the IoT Hub documentation recommends using Event Grid if MQTT is desired, as it supports all the necessary features.

So, what should I do if I follow that recommendation and use Event Grid? How can I automatically generate certificates in that case?

Azure Internet of Things
{count} votes

Accepted answer
  1. Sander van de Velde | MVP 36,766 Reputation points MVP Volunteer Moderator
    2025-06-19T07:02:09.4333333+00:00

    Hello @Roy,

    welcome to this moderated Azure community forum.

    The Device provisioning service is bound to one or more IoT Hub, registering (and moving around) devices to specific IoT Hub based on a registration flow.

    The IoT Hub is a great cloud gateway with secure two way connection and a 'device twin' containing state for each device.

    The IoT Hub communicates over MQTT (and other protocols are supported) but it is not a vanilla MQTT broker.

    If you want to use plain MQTT complete with freedom to use your own topic structure, the EventGrid Namespace MQTT broker is a better choice.

    At this moment, the EventGrid Namespace does not have a provisioning service. So you need to build something yourself.

    At this moment, the Eventgrid namespace MQTT broker has a new public preview feature :

    Webhook authentication allows external HTTP endpoints (webhooks or functions) to authenticate MQTT connections dynamically.

    You can add custom (Azure Function) logic to the authentication flow.

    Perhaps this could help you?


    If the response helped, do "Accept Answer". If it doesn't work, please let us know the progress. All community members with similar issues will benefit by doing so. Your contribution is highly appreciated.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.