web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Dealing with a 302 res...
Power Automate
Suggested Answer

Dealing with a 302 response in Power Automate

(0) ShareShare
ReportReport
Posted on by 20

Hi,

 

I want to download a file - when I enter the URL in the browser it downloads.

 

When I use the HTTP request in power automate is returns a 302 error. I have tried the run after failed option but this returns a another http link as opposed to the body content.

 

I have attached the flow and a screenshot from power automate.

 

If I click deal with the 302 redirect response in postman it downloads the file correctly, wondering how to do this in power automate.

 
 

 

Capture11.PNGpowerautomate1.PNGprocore2.PNG

Categories:
I have the same question (2)
  • ChristianAbata Profile Picture
    8,953 Most Valuable Professional on at

    hi @thomas1992UK  your link is public? Becouse 302 error is when you have headers to redirect the link, so you need to disable redirect headers from your website.

  • thomas1992UK Profile Picture
    20 on at
    It’s an api call with oauth2
  • ChristianAbata Profile Picture
    8,953 Most Valuable Professional on at

    @thomas1992UK  mm ok, so in body you need to add the parameter you need to correctly log in. Parameters like this.

    client_id=exampleApiKey&client_secret=exampleSecret&username=someUsername&password=WithSomePassword

      

  • thomas1992UK Profile Picture
    20 on at
    Infact sorry, it is a public api
  • ChristianAbata Profile Picture
    8,953 Most Valuable Professional on at

    @thomas1992UK  another thing you can do is run after error because as I told you the error is an redirect error so maeby you need someting in you header html page.

     

    runafter.gif

  • thomas1992UK Profile Picture
    20 on at

    Thanks, now I have this bit working.

     

    When I get the body from the HTTP request it returns it like the image (binary?), how do I transform this to a viewable image?

     

    Thanks,

    Tomtext file.PNG

  • MattBarker Profile Picture
    49 on at

    Please provide the solution to the download rather than just stating "Thanks, now I have this bit working."

  • TheFactorY Profile Picture
    29 on at

    How did you get this working? Same question 🙂

  • Suggested answer
    MB-30070209-0 Profile Picture
    8 on at
    I've managed to get it to work for my requirement.
    It appears that the request needed to include an "Accept" header in addition to the "content-type" header I already had.
    Once I added that header to the request, then it handled the 302 response and returned a 200-OK with the expected  body content.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 262 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 167

#3
Haque Profile Picture

Haque 154

Last 30 days Overall leaderboard