Unable to connect to eventhub from logic apps

pratap palukuru 1 Reputation point
2022-04-07T16:20:35.597+00:00

Hi ,
I am trying to listen events from eventhub using logic apps.i used when events available in eventhub trigger .
I have used root policy connection string from eventhub.
But I am getting unauthorised error.no other error statements.

Can anybody help me how to fix it? Or what to check to fix this.

The eventhub and logic app are in different tenants

Thanks.

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Bruno Lucas 4,436 Reputation points MVP
    2022-04-11T05:30:21.033+00:00
    0 comments No comments

  2. AnuragSingh-MSFT 21,566 Reputation points Moderator
    2022-04-11T10:18:22.903+00:00

    Hi @pratap palukuru ,

    Welcome to Microsoft Q&A! Thanks for posting the question.

    Based on my understanding, you are trying to trigger LogicApps using EventHub trigger, i.e., whenever events arrive in a particular EventHub instance. I tested a sample scenario with EventHub in different subscription/tenant than the LogicApps and following are the high-level steps that I followed, which resulted in successful run of LogicApps:

    • I used the 191856-image.png --> copied the Connection string–primary key. (This would contain the endpoint as well as the access key).
    • In Logic Apps, I used the "When events are available in Event Hub" trigger and created connection using the Access Key option:
      191866-image.png

    The trigger looks as below:
    191786-image.png

    This worked as expected for me. In case you are facing issues with this workflow, please check the following:

    1. Where are you getting the error of "un-authorized"? If you are getting it in LogicApps, please check the "Run History". You get this the "Run history" on the Overview page of Logic Apps. Ensure that the connection string was properly copied and EventHub name in LogicApps trigger matches to the EventHub instance name (In Azure Portal --> Event Hub --> Event Hubs.

    2. Once you see a failed instance in "Run history", click on it to observe the successful and failed activities/trigger in the LogicApps. Check the Trigger/activity which failed and click on it to gain more details. You may also check the "raw inputs" and "raw outputs" for these activities/triggers to gain more insights of the error.

    3. You may also check the "Activity log" of Logic Apps for more details on failure.

    4. In case you are still facing issues with this workflow, please comment here with a screenshot of the error, run history details (which shows the exact activity that failed) along with the details of failure (raw input/output).

    Please let me know if you have any questions.

    ---
    Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.