How to Handle Logic Apps redirect URL with HTTP Get command

Brian Hood 21 Reputation points
2024-12-07T14:56:25.1+00:00

I am executing a HTTP get logic apps step with the goal of receiving a response from the URL and saving data into a Cosmos database. I am getting an error at step 3 when I use the redirect URL.

  1. Step 1: HTTP get : The same request is successful in postman. This request in Logic Apps gives a 302 redirect error.
  2. Step 2: I created a Logic Apps condition to handle the redirect error. If an error happens, I execute another HTTP get request with the redirect response from step 1. I use the following expression in the HTTP URI field:
       actions('http').outputs.headers.location
    
    . When I run the logic app, I get an error that says "The provided .....URI is not sanitized on my last step"...(see below). Any thoughts on next steps I can take? User's image
Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
3,390 questions
{count} votes

1 answer

Sort by: Most helpful
  1. VenkateshDodda-MSFT 24,136 Reputation points Microsoft Employee
    2024-12-09T04:01:04.93+00:00

    @Brian Hood Thanks for posting your question in Microsoft Q&A, apologize for any inconvenience caused on this.

    The error message states that you need to provide the Absolute URI (https://**/.com) instead of sanitized URI(\v2\).

    Also, as per the HTTP action documentation, it is clearly called out that your need to pass the HTTP/HTTPS endpoint URL to send/call any outbound request.

    If you are trying to send a HTTP request to Azure Service, then then you need to use the resource ID as the URI parameter.

    User's image

    I would suggest you modify the URI in the HTTP action with absolute URI and let us know if you are still facing the issue.

    Hope this helps, let me know if you have any further questions on this.

    0 comments No comments

Your answer

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