Connect Azure IoT Hub and Event Hubs

Read device telemetry from the IoT Hub built-in endpoint or an Event Hub.

If devices already send telemetry to Azure IoT Hub or Event Hubs, InduQT can read it with its own consumer group, alongside your other consumers.

Find the connection string

IoT Hub

  1. Open the built-in endpoint

    In the Azure portal, open the IoT hub and go to Hub settings → Built-in endpoints.

  2. Copy the Event Hub-compatible endpoint

    Choose the service shared access policy (it can read device-to-cloud messages) and copy Event Hub-compatible endpoint. It starts with Endpoint=sb:// and ends with EntityPath=….

  3. Add a consumer group

    On the same page, under Consumer Groups, add induqt. A dedicated group stops InduQT and your other readers from taking messages from each other.

Azure CLI
az iot hub consumer-group create --hub-name my-hub --name induqt
az iot hub connection-string show --hub-name my-hub --policy-name service --default-eventhub

Event Hubs

Open the event hub (not the namespace), add a shared access policy with Listen under Settings → Shared access policies, and copy its connection string; created at this level it includes EntityPath. Add a consumer group under Entities → Consumer groups.

Add the connector

In the app: open the site and choose Azure IoT Hub / Event Hubs. Or with the API:

POST /v1/connectors
curl -X POST "https://api.induqt.ai/v1/connectors" \
  -H "Authorization: Bearer $INDUQT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "siteId": "6f1c2c0e-4b1a-4c55-9d0e-1f2a3b4c5d6e",
  "type": "eventhub",
  "name": "Azure IoT Hub",
  "config": {
    "connectionString": "Endpoint=sb://…;SharedAccessKeyName=service;SharedAccessKey=…;EntityPath=…",
    "consumerGroup": "induqt"
  },
  "mapping": {
    "machineFrom": "device",
    "autoCreate": true
  }
}'
Azure IoT Hub / Event Hubs settings
NameDescription
connectionStringrequiredEvent Hub-compatible connection string including EntityPath (IoT Hub: Built-in endpoints). Encrypted at rest.
consumerGroupDefault $Default. Create a dedicated group for InduQT.

Mapping. machineFrom: "device" (IoT Hub device id) | "payload" (machineField) | "fixed". Values and timestamp as for MQTT.

Device id mapping

With machineFrom: "device", the IoT Hub device id names the machine: register devices with the machine's externalId as the device id (for example B-101), or set autoCreate: true to add a machine for each new device. The message body is JSON, read as for MQTT:

Device-to-cloud message from device B-101
{
  "ts": "2026-10-27T03:12:09Z",
  "steam_pressure": 112.4,
  "steam_flow": 2.1,
  "flue_o2": 3.2
}
Machine sources for Event Hub messages
machineFromMachine comes fromUse when
deviceThe IoT Hub device idOne IoT Hub device per machine (the common case)
payloadA field in the message, machineFieldA gateway device sends for several machines, or plain Event Hubs
fixedThe machine you setEverything on this hub is one machine

Troubleshooting

Troubleshooting
SymptomLikely cause and fix
UnauthorizedThe policy cannot read: use service (IoT Hub) or a Listen policy (Event Hubs), and the Event Hub-compatible string, not the IoT Hub one (HostName=…).
Missing EntityPathA namespace-level string has no EntityPath. Copy the string from the built-in endpoint or from the event hub itself.
Messages split between readersAnother reader is using the same consumer group. Give InduQT its own (induqt).
Messages arrive but no machineThe device id does not match a machine's externalId. Rename, or set autoCreate: true.
Body not readSend UTF-8 JSON. Set the message content type to application/json and encoding to utf-8 in the device SDK.
Hub IP filter or private endpointIf public network access is restricted, InduQT cannot reach the endpoint. Allow access, or forward with an Azure Function to the ingest API.