Edit

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

  • 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.

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.

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. The Streaming data page opens by default. Click on the Add data button to get to the Add data page.

    Screenshot that shows the Add data page in the Real-Time hub.

    You can also get to the Add data page directly by selecting the Add data option in the left navigation bar.

    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 the Namespace topic section vary depending on whether Message Queuing Telemetry Transport (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.

Stream or source details

  1. On the Connect page, follow one of these steps based on whether you're using Eventstream or Real-Time hub.

    • Eventstream:

      In the Source details pane to the right, follow these steps:

      1. For Source name, select the Pencil button to change the name.

      2. Notice that Eventstream name and Stream name are read-only.

    • Real-Time hub:

      In the Stream details section to the right, follow these steps:

      1. Select the Fabric workspace where you want to create the eventstream.

      2. For Eventstream name, select the Pencil button, and enter a name for the eventstream.

      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.

  2. Select Next at the bottom of the Configure page.

Review and connect

On the Review + connect screen, review the summary, and select Add (Eventstream) or Connect (Real-Time hub).

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: