@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:
- Go to the Azure portal and navigate to your Event Hub.
- Click on "Access control (IAM)" and then click on "Add".
- In the "Add role assignment" blade, select the role you want to assign (e.g. "Azure Event Hubs Data Owner").
- In the "Assign access to" section, select "User, group, or service principal".
- In the "Select" field, search for your App Registration by name.
- Select your App Registration from the search results and click on "Save".
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.