แก้ไข

แชร์ผ่าน


Enable managed identity for an Azure Event Hubs namespace

This article shows you how to enable a managed identity for an Azure Event Hubs namespace. The identity can be either a system-assigned managed identity or a user-assigned managed identity.

Enable system-assigned managed identity for a namespace

Here are the steps to enable a system-assigned managed identity for an Event Hubs namespace by using the Azure portal.

  1. Sign-in to the Azure portal.

  2. Navigate to your Event Hubs namespace.

  3. On the Event Hubs namespace page, select Identity on the left menu.

  4. On the Identity page, confirm that you are on the System assigned tab.

  5. For the Status field, select On.

  6. Select Save the command bar.

    Screenshot that shows the Identity page for an Event Hubs namespace with system-assigned managed identity enabled.

  7. In the Pop-up window, select Yes.

    Screenshot that shows the popup window to enable the system-assigned identity.

Enable user-assigned managed identity for a namespace

Here are the steps to enable a user-assigned managed identity for an Event Hubs namespace by using the Azure portal.

  1. Sign-in to the Azure portal.

  2. If you didn't create a user-assigned identity already, create one by following instructions from: Manage user-assigned managed identities.

  3. In the Azure portal, navigate to your Event Hubs namespace.

  4. On the Event Hubs namespace page, select Identity on the left menu.

  5. Switch to the User assigned tab, and select + Add on the command bar.

    Screenshot that shows the User assigned tab.

  6. In the Add user assigned identity pane, search for and select a user-assigned identity, and then select Add.

    Screenshot that shows the selection of a user assigned identity.

After you enable managed identity for your Event Hubs namespace, grant the identity appropriate role on a target resource. For example, if you want to enable capturing of event data on an event hub using a managed identity, the managed identity should be added to the Storage Blob Data Contributor role on the Azure storage or Data Lake Store account. For more information on using identities for capturing event data, see Authenticate modes for capturing events to destinations in Azure Event Hubs.