Edit

Share via


Get events from Azure Event Grid namespace into Fabric Real-Time hub

This article describes how to get events from an Azure Event Grid namespace into Fabric Real-Time hub.

Prerequisites

  • Access to a workspace in the Fabric capacity license mode (or) the Trial license mode with Contributor or higher permissions.
  • Enable managed identity on the Event Grid namespace.
  • Enable MQTT and routing on the Event Grid namespace, if you want to receive Message Queueing Telemetry Transport (MQTT) data.

Get events from an Azure Event Grid namespace

You can get events from an Azure Event Grid namespace into Real-Time hub in one of the following ways:

Azure sources page

  1. In Real-Time hub, select Azure sources on the left navigation menu. You can use the search box to the type your resource name or use filters (Source, Subscription, Resource group, Region) to search for your resource.

  2. For Source at the top, select Azure Event Grid Namespace from the drop-down list.

  3. For Subscription, select an Azure subscription that has the resource group with your Event Grid namespace.

  4. For Resource group, select a resource group that has your Event Grid namespace.

  5. For Region, select a location where your Event Grid namespace is located.

  6. Now, move the mouse over the name of the Event Grid namespace that you want to connect to Real-Time hub in the list of namespaces, and select the Connect button, or select ... (ellipsis), and then select Connect data source.

    Screenshot that shows the Azure sources page with filters to show Event Grid namespaces and the connect button for a namespace.

    Now, move on to the Configure and connect to an Event Grid namespace section. Skip the selection of subscription and namespace as they're already selected for you.

Data sources page

  1. Sign in to Microsoft Fabric.

  2. If you see Power BI at the bottom-left of the page, switch to the Fabric workload by selecting Power BI and then by selecting Fabric.

    Screenshot that shows how to switch to the Fabric workload.

  3. Select Real-Time on the left navigation bar.

    Screenshot that shows how to launch Connect to data source experience.

  4. On the Real-Time hub page, select + Data sources under Connect to on the left navigation menu.

    Screenshot that shows the Data sources page in the Real-Time hub.

    You can also get to the Data sources page from the Real-Time hub page by selecting the + Add data button in the top-right corner.

    Screenshot that shows the Connect data source button.

  1. On the Data sources page, search for Azure Event Grid namespace, and then select Connect on the Azure Event Grid Namespace tile.

    Screenshot that shows the selection of Azure Event Grid namespace as the source type in the Data sources page.

Configure and connect to the Event Grid namespace

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 data stream details

  1. On the Review + connect page, if you select Open eventstream, the wizard opens the eventstream that it created for you with the selected Event Grid namespace as a source. To close the wizard, select Finish at the bottom of the page.

    Screenshot that shows the Review + connect page with links to open eventstream and close the wizard.

  2. You should see the stream in the Recent streaming data section of the Real-Time hub page. For detailed steps, see View details of data streams in Fabric Real-Time hub.

    Screenshot that shows the Real-Time hub All data streams page with the stream you just created.

Confidential and highly confidential sensitivity

If you mark the eventstream with either Confidential or Highly Confidential sensitivity labels, follow these steps so that the Event Grid namespace's managed identity has the appropriate access.

  • Select Settings (gear icon) in the top-right corner.

  • Select Admin portal in the Governance and insights section.

    Screenshot that shows the selection of Admin portal link in the Governance and insights section.

  • Activate the following tenant setting to grant the service principal access to Fabric APIs for creating workspaces, connections, or deployment pipelines.

    • On the Tenant settings page, in the Developer settings section, expand Service principal can use Fabric API option.

    • Toggle to Enabled.

    • Apply to the entire organization.

    • Select Apply.

      Screenshot that shows the developer settings.

  • Enable this option to access all other APIs (enabled by default for new tenants):

    • On the Tenant settings page, in the Developer settings section, expand Allow Service principals to create and use profiles option.
    • Toggle to Enabled.
    • Apply to the entire organization.
    • Select Apply.

To learn about consuming data streams, see the following articles: