Add Event Hub Role to App Registration

Walenwein. Jakob 0 Reputation points
2023-12-14T12:25:20.9966667+00:00

Hello,

i try to assign my event hub a newly created app registration (for authentiation). I go to the event hub and click on "role assignment", but there i can only assign the "azure event hubs owner" role to some user, NOT to the app registration.

Do i understand here smth wrong?

Thx.

Azure Event Hubs
Azure Event Hubs
An Azure real-time data ingestion service.
558 questions
{count} votes

1 answer

Sort by: Most helpful
  1. PRADEEPCHEEKATLA-MSFT 77,516 Reputation points Microsoft Employee
    2023-12-15T02:25:11.7133333+00:00

    @Walenwein. Jakob - Thanks for the question and using MS Q&A platform.

    What do you mean by unable to assign role for app registration, do you mean app registeration is not available or you are unable to find?

    Could you please share the screenshots of app registration and role assigned page in Azure Event Hubs?

    You can assign a role to a Service Principal, which is created when you register an application in Azure AD.

    To assign a role to your App Registration, you need to follow these steps:

    1. Go to the Azure portal and navigate to your Event Hub.
    2. Click on "Access control (IAM)" and then click on "Add".
    3. In the "Add role assignment" blade, select the role you want to assign (e.g. "Azure Event Hubs Data Owner").
    4. In the "Assign access to" section, select "User, group, or service principal".
    5. In the "Select" field, search for your App Registration by name.
    6. Select your App Registration from the search results and click on "Save".

    User's image

    This will assign the selected role to the Service Principal associated with your App Registration, which will allow your application to access the Event Hub.

    Note that you need to have the appropriate permissions to assign roles to Service Principals. If you do not have the required permissions, you need to contact your Azure AD administrator to grant you the necessary permissions.

    Hope this helps. Do let us know if you any further queries.