Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
uriel-kluk
New Member

Preserve IoT Hub system properties and user properties

Description
Events from the IoT Hub source drop key properties. We need full pass-through of system and user properties for routing and lineage.

User Example
Diego runs a fleet of smart vending machines. Each machine sends telemetry with a user property message-type=timeSeries. When stock is low, the device sends message-type=alert. Diego needs to route alerts directly to a monitoring system. Without user properties, he cannot build a routing rule and must instead parse message bodies, adding complexity and cost.

Expected Result

  • Map system properties to columns: deviceId, moduleId, enqueuedTime, messageId, correlationId, contentType, contentEncoding, connectionAuthMethod.

  • Preserve all user properties as a bag.

  • Expose user and system property keys for transformations.

  • DeviceId is always present.

  • IoTHub Enriched metadata is present.

Actual Result

  • DeviceId and other system properties are missing.

  • User properties do not arrive.

Impact

  • Cannot route by user property like message-type.

  • Cannot trace messages to devices without joins.

References
IoT Hub system properties: https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-messages-construct#system-propertie...

Repro Steps

  1. Send a D2C message with user property message-type=alarms.

  2. Inspect the record in Eventstream.

  3. Observe missing deviceId and missing user properties.

Acceptance Criteria

  • Given any D2C message, deviceId is a column.

  • Given user properties, all appear in a properties bag.

  • Given message-type=alarms, routing rules can use it directly.

  • Given contentType and contentEncoding, values match the source message.

1 ACCEPTED SOLUTION
tayloramy
Community Champion
Community Champion

Hi @uriel-kluk

 

You’re not missing anything. Today, the Eventstream IoT Hub source doesn’t surface IoT Hub SystemProperties or Application (user) properties into the canvas/operators, so fields like deviceId, moduleId, enqueuedTime, messageId, contentType/contentEncoding, and user property bags don’t show up. That’s why routing on a user property like message-type isn’t possible inside Eventstream yet. For reference, the system/user properties you’re expecting are defined by IoT Hub itself here: IoT Hub message system properties, and the Eventstream IoT Hub connector setup is here: Add IoT Hub source to Eventstream.

Here are options you can use right now:

1) Route at IoT Hub (fastest and keeps costs down)
Define routes on IoT Hub using the Application property you already send, e.g. message-type='alert', so “alerts” and “timeSeries” get split at the source. Then point Fabric at the appropriate endpoints. IoT Hub routing query syntax is documented here: Routing query syntax.
• Common pattern: IoT Hub -> route “alerts” to a dedicated Event Hub (or Storage), and “timeSeries” to another endpoint. In Fabric, add the Event Hub(s) as Eventstream sources: Add Event Hubs source.

2) Preserve system properties via Event Hubs -> KQL mapping
If your goal is lineage and analytics in KQL/Eventhouse, connect to Event Hubs and map system properties into columns when landing the data. Fabric’s Event Hubs “Get Data” flow supports embedding system properties (device id, enqueued time, etc.) into the table schema: Get data from Azure Event Hubs (system properties mapping).

3) Enrich upstream, then send to Fabric
Use Azure Stream Analytics or an Azure Function to read from IoT Hub, project SystemProperties and ApplicationProperties into the JSON body, and forward into Fabric via a Custom App/endpoint source. ASA exposes these values with functions like GetMetadataPropertyValue: ASA GetMetadataPropertyValue. Fabric Custom App/endpoint source: Add a custom endpoint/app source.

A few extra notes that help avoid surprises:
• If you plan to query the body at IoT Hub (for body-based routing), set contentType=application/json and a UTF contentEncoding; IoT Hub only evaluates body queries when those are set: Routing query requirements.
• Device identity info normally lives in IoT Hub system properties (e.g., iothub-connection-device-id): System properties list.

If you want this supported natively in Eventstream (ideal: “preserve all user properties as a bag” and “project IoT Hub system properties into columns”), please add/vote an idea under Real-Time Intelligence | Eventstream so the product group can track it: Fabric Ideas (Eventstream).

 

If you found this helpful, consider giving some Kudos. If I answered your question or solved your problem, mark this post as the solution.

View solution in original post

4 REPLIES 4
uriel-kluk
New Member

@tayloramy thanks for the detailed explanation.

I was able to split the message-type as you suggested using IoT Hub routing.

After enabling Multiple Schemas (Preview), I started receiving the System Properties as expected.

However, unless I'm missing something, it looks like the Application Properties and IoT Hub Enrichments are still not coming through. I can continue working now that the data is split, but this does feel like a limitation.

Giving you Kudos and accepting the solution, but I am going to add a feature request to have the full message projected.

Hi @uriel-kluk

I agree that this is a limitation. Once you create the idea for the feature request, post the link here and I will vote for it. 

 

You can create the idea here: https://community.fabric.microsoft.com/t5/Fabric-Ideas/idb-p/fbc_ideas

 

If you found this helpful, consider giving some Kudos. If I answered your question or solved your problem, mark this post as the solution.

v-sgandrathi
Community Support
Community Support

Hi @uriel-kluk,

Thank you @tayloramy for your response to thq query.

Has your issue been resolved?
If the response provided by the community member addressed your query, could you please confirm? It helps us ensure that the solutions provided are effective and beneficial for everyone.

 

Thank you for your understanding!

tayloramy
Community Champion
Community Champion

Hi @uriel-kluk

 

You’re not missing anything. Today, the Eventstream IoT Hub source doesn’t surface IoT Hub SystemProperties or Application (user) properties into the canvas/operators, so fields like deviceId, moduleId, enqueuedTime, messageId, contentType/contentEncoding, and user property bags don’t show up. That’s why routing on a user property like message-type isn’t possible inside Eventstream yet. For reference, the system/user properties you’re expecting are defined by IoT Hub itself here: IoT Hub message system properties, and the Eventstream IoT Hub connector setup is here: Add IoT Hub source to Eventstream.

Here are options you can use right now:

1) Route at IoT Hub (fastest and keeps costs down)
Define routes on IoT Hub using the Application property you already send, e.g. message-type='alert', so “alerts” and “timeSeries” get split at the source. Then point Fabric at the appropriate endpoints. IoT Hub routing query syntax is documented here: Routing query syntax.
• Common pattern: IoT Hub -> route “alerts” to a dedicated Event Hub (or Storage), and “timeSeries” to another endpoint. In Fabric, add the Event Hub(s) as Eventstream sources: Add Event Hubs source.

2) Preserve system properties via Event Hubs -> KQL mapping
If your goal is lineage and analytics in KQL/Eventhouse, connect to Event Hubs and map system properties into columns when landing the data. Fabric’s Event Hubs “Get Data” flow supports embedding system properties (device id, enqueued time, etc.) into the table schema: Get data from Azure Event Hubs (system properties mapping).

3) Enrich upstream, then send to Fabric
Use Azure Stream Analytics or an Azure Function to read from IoT Hub, project SystemProperties and ApplicationProperties into the JSON body, and forward into Fabric via a Custom App/endpoint source. ASA exposes these values with functions like GetMetadataPropertyValue: ASA GetMetadataPropertyValue. Fabric Custom App/endpoint source: Add a custom endpoint/app source.

A few extra notes that help avoid surprises:
• If you plan to query the body at IoT Hub (for body-based routing), set contentType=application/json and a UTF contentEncoding; IoT Hub only evaluates body queries when those are set: Routing query requirements.
• Device identity info normally lives in IoT Hub system properties (e.g., iothub-connection-device-id): System properties list.

If you want this supported natively in Eventstream (ideal: “preserve all user properties as a bag” and “project IoT Hub system properties into columns”), please add/vote an idea under Real-Time Intelligence | Eventstream so the product group can track it: Fabric Ideas (Eventstream).

 

If you found this helpful, consider giving some Kudos. If I answered your question or solved your problem, mark this post as the solution.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

Real Time Intelligence in a Day

Real-Time Intelligence in a Day—Free Training

Turn streaming data into instant insights with Microsoft Fabric. Learn to connect live sources, visualize in seconds, and use Copilot + AI for smarter decisions.

September Fabric Update Carousel

Fabric Monthly Update - September 2025

Check out the September 2025 Fabric update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors