Azure IoT Hub: device authentication, D2C telemetry, Device Twins, and direct methods in one managed service
Azure IoT Hub is Microsoft’s managed service for bi-directional IoT communication. For device manufacturers building connected products, it provides device identity, messaging, and management without running your own MQTT broker.
DPS handles zero-touch provisioning at scale — devices with X.509 certificates auto-register to the correct IoT Hub based on enrollment group rules:
az iot dps enrollment-group create --dps-name fss-dps --enrollment-id fss-production --certificate-path manufacturing-ca.crt --iot-hubs fss-prod.azure-devices.net --allocation-policy hashed
{
"desired": {
"firmware": {"version":"2.1.0","url":"https://...","sha256":"abc..."}
},
"reported": {
"firmware": {"version":"2.0.3","status":"downloading","progress":45}
}
}
az iot hub invoke-device-method --hub-name fss-prod --device-id "device-001" --method-name "restart" --method-payload "{"reason":"scheduled"}" --timeout 30
IoT Hub’s message routing engine lets you send different message types to different endpoints based on message properties or body content. Routing rules use a SQL-like syntax and run at ingestion time — before messages enter Event Hubs or Service Bus. This means your downstream processing services receive pre-filtered streams, reducing processing load and cost.
SELECT * FROM messages WHERE messageType = 'alert' AND severity >= 7 -- Telemetry stays in Event Hub; alerts go to Service Bus queue -- Staff on-call system subscribes to the Service Bus queue
Message enrichment adds static or device twin properties to every message before routing — for example, adding a device’s customer ID, geographic region, or hardware revision from the device twin to every telemetry message. This removes the need for downstream services to look up device metadata on every message.
IoT Hub pricing is tier-based, and getting the tier wrong is expensive. The S1 tier allows 400,000 messages per day per unit — for a 1,000-device fleet sending telemetry every 30 seconds, that is 2,880,000 messages per day, requiring 8 S1 units or a single S3 unit. Calculate your message volume carefully before provisioning: include telemetry, device twin updates, direct method calls, and OTA operations.
The free tier (F1) is limited to 8,000 messages per day and 500 devices — useful for development, inadequate for any production fleet. S1 is the right tier for most product launches; S3 (with 300 million messages per unit per day) suits fleets of tens of thousands of devices.
IoT Hub integrates natively with the broader Azure ecosystem: Event Hubs for stream processing, Azure Stream Analytics for real-time queries, Azure Time Series Insights (and its successor Azure Data Explorer) for telemetry storage, Azure Functions for serverless event processing, and Azure Logic Apps for workflow automation. This ecosystem integration is one of IoT Hub’s strongest advantages over self-hosted MQTT brokers — the plumbing between services is pre-built and managed.
For device manufacturers building their first connected product, starting with Azure IoT Hub and expanding to additional services as needed is the lowest-risk path. The managed infrastructure allows your engineering team to focus on product features rather than infrastructure operations.
FSS is a full-stack IoT engineering team — hardware, firmware, cloud, and mobile in one place.
FSS Technology designs and builds IoT products from silicon to cloud — embedded firmware, custom hardware, and Azure backends.
Talk to our team →