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.
Device Provisioning Service (DPS)
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
Device Twins
{
"desired": {
"firmware": {"version":"2.1.0","url":"https://...","sha256":"abc..."}
},
"reported": {
"firmware": {"version":"2.0.3","status":"downloading","progress":45}
}
}
Direct Methods
az iot hub invoke-device-method --hub-name fss-prod --device-id "device-001" --method-name "restart" --method-payload "{"reason":"scheduled"}" --timeout 30
Message Routing and Enrichment
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, you can add 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 Limits and Tier Selection
IoT Hub pricing is tier-based, and getting the tier wrong is expensive. The S1 tier allows 400,000 messages per day per unit. A 1,000-device fleet sending telemetry every 30 seconds generates 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. That is enough for development, but not 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.
Integration with Azure Services
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 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, the lowest-risk path is to start with Azure IoT Hub and add services as you need them. Because the infrastructure is managed, your engineering team can spend its time on product features.
Building an IoT product?
At FSS, one team handles hardware, firmware, cloud, and mobile.