Hello @Bee aNad ,
Welcome to the Microsoft Q&A platform.
Make sure you had authorized access to Event Hubs resources using Shared Access Signatures.
Every time you publish or consume events/data from an event hub, your client is trying to access Event Hubs resources. Every request to a secure resource must be authorized so that the service can ensure that the client has the required permissions to publish/consume the data.
Steps to Grant access to the event hub and get a connection string:
Before an application can send data to Azure Event Hubs, the event hub must have a policy that allows access. The access policy produces a connection string that includes authorization information.
Step1: Navigate to the event hub you created in the previous step, MyEventHub. Select Shared access policies under Settings, and then select + Add.
Step2: Name the policy MyPolicy and ensure Manage is checked. Then select Create.
Reference: Create an Azure Event Hub - Grant access to the event hub and get a connection string section.
Hope this helps. Do let us know if you any further queries.
------------
- Please accept an answer if correct. Original posters help the community find answers faster by identifying the correct answer. Here is how.
- Want a reminder to come back and check responses? Here is how to subscribe to a notification.