Edit

Share via


Add an Event Grid namespace to an eventstream for real-time event and MQTT data ingestion

In today's connected world, organizations rely on streaming event data and Internet of Things (IoT) data for real-time analytics, monitoring, and decision-making. With the new capability to add an Azure Event Grid namespace as a source to an eventstream, you can seamlessly bring both standard events and Message Queuing Telemetry Transport (MQTT) messages into Microsoft Fabric.

This integration enables scenarios like industrial IoT monitoring, connected vehicle data, and enterprise system integration without complex custom pipelines. By bridging Event Grid and Fabric eventstreams, you gain a powerful, scalable foundation to process millions of events per second and unlock insights instantly across your data estate.

This connector ingests both CloudEvents from namespace topics and MQTT telemetry directly from Azure Event Grid into Fabric Eventstream.

This article shows you how to add an Event Grid namespace source to an eventstream.

Prerequisites

  • Create or have an Event Grid namespace with managed identity enabled.

  • A workspace that's not My workspace, operating in a Fabric capacity or trial license mode, is required.

  • If you have Member (or higher) permissions, no extra setup is needed. If you don't have Member permissions, ask a colleague with Member access to assign Contributor access to the Event Grid service principal before you add the source:

    1. In the workspace, open the Manage access pane.
    2. Select Add people or groups.
    3. Enter the Event Grid namespace name and choose the matching service principal.
    4. Assign the Contributor role and select Add.
  • Enable MQTT and routing on the Event Grid namespace, if you want to receive MQTT data.

  • Create an eventstream if you don't have one.

Configure portal settings

To ensure that the managed identity of the Event Grid namespace has the required permissions, configure settings in the admin portal:

  1. In the upper-right corner, select Settings (gear icon).

  2. In the Governance and insights section, select Admin portal.

    Screenshot of the link for the admin portal in Power BI settings.

  3. On the Tenant settings page, go to the Developer settings section.

  4. To grant the service principal access to Fabric APIs for creating workspaces, connections, or deployment pipelines:

    1. Expand the Service principals can use Fabric APIs option.
    2. Set the toggle to Enabled.
    3. Under Apply to, select The entire organization.
    4. Select Apply.

    Screenshot that shows developer settings.

    To access all other APIs (enabled by default for new tenants):

    1. Expand the Allow service principals to create and use profiles option.
    2. Set the toggle to Enabled.
    3. Under Apply to, select The entire organization.
    4. Select Apply.

Start the wizard for selecting a data source

If you haven't added any source to your eventstream yet, select the Use external source tile.

Screenshot that shows the selection of the tile for using an external source.

If you're adding the source to an already published eventstream, switch to Edit mode. On the ribbon, select Add source > External sources.

Screenshot that shows selections for adding external sources.

On the Select a data source page, search for Azure Event Grid Namespace. On the Azure Event Grid Namespace tile, select Connect.

Screenshot that shows the selection of an Azure Event Grid namespace as the source type in the wizard for getting events.

Configure the Event Grid connector

On the Configure connection settings page, follow these steps:

  1. For Subscription, select the Azure subscription that has the Event Grid namespace.

  2. For Namespace name, select your Event Grid namespace from the dropdown list.

  3. The contents of Namespace topic section vary depending on whether MQTT is enabled:

    • If MQTT isn't enabled for the namespace topic, create a new topic or select an existing topic.

      Screenshot that shows configuration settings for an Azure Event Grid namespace when MQTT isn't enabled.

    • If the namespace has MQTT enabled, a topic, and routing enabled, select the subscription and the namespace name.

      Screenshot that shows configuration settings for an Event Grid namespace when MQTT and routing are enabled.

    • If the namespace has MQTT enabled but routing isn't enabled for the namespace, select the subscription, the namespace name, and namespace topic options.

      Screenshot that shows configuration settings for an Azure Event Grid namespace when MQTT is enabled but routing isn't enabled.

  4. If you're using the real-time hub, follow these steps:

    1. In the Stream details section to the right, select the Fabric workspace where you want to save the eventstream.
    2. For Eventstream name, enter a name for the eventstream. The wizard creates an eventstream with the selected Event Grid namespace as a source.
    3. The Stream name value is automatically generated for you by appending -stream to the name of the eventstream. This stream appears on the real-time hub's All data streams page when the wizard finishes.

    Screenshot that shows the stream details section for the Event Grid namespace.

  5. If you're using the eventstream editor to add an Event Grid namespace as a source to an eventstream, select the pencil button under Source name. Then enter a source name.

  6. Select Next at the bottom of the page.

  7. On the Review + connect page, review your settings, and then select Connect.

    Screenshot that shows the page for reviewing settings and creating an Event Grid namespace.

    The following example shows what the page looks like if both MQTT and routing are enabled for the namespace.

    Screenshot that shows the page for reviewing and connecting with MQTT and routing enabled.

    The following example shows what the page looks like if MQTT is enabled for the namespace but routing isn't enabled.

    Screenshot that shows the page for reviewing and connecting with MQTT enabled but routing not enabled.

View an updated eventstream

  1. On the Review + connect page, select Add.

  2. Confirm that the Event Grid source is added to your eventstream on the canvas in the Edit mode. To implement this newly added Event Grid namespace, select Publish on the ribbon.

    Screenshot that shows the editor with Publish button selected.

  3. The Event Grid namespace is available for visualization in the Live view. Select the Event Grid Namespace tile in the diagram to show details about the source.