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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Custom Connector follo...
Power Automate
Answered

Custom Connector follow 302 redirect url

(0) ShareShare
ReportReport
Posted on by 410 Moderator

Hi All,

 

Im working on a customer connector, the api its calling returns a redirect from any post url. The redirect url is returned in a "location" header with the 302 response. Is there a way to get the custom connector to follow the redirect (like Postman does)?

 

davedidisco_0-1708517005587.png

 

thank you

Categories:
I have the same question (0)
  • Yogesh Murugan Profile Picture
    443 Moderator on at

    Response

    If successful, this method returns a 302 Found response that redirects to a preauthenticated download URL for the report. That URL can be found in the Location header in the response.

    Preauthenticated download URLs are only valid for a short period of time (a few minutes) and do not require an Authorization header.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. , please consider giving it Thumbs Up.

  • wyattdave Profile Picture
    410 Moderator on at

    Hi @YogeshMurugn ,

     

    Sorry but I don't understand how this solves my issue, your response looks like a copy and paste from Microsoft Learn https://learn.microsoft.com › api › r... getOneDriveActivityFileCounts - Microsoft Graph v1.0 , which is just an example of my API setup not a solution to custom connectors using it 

     

    Thank you 

  • Yogesh Murugan Profile Picture
    443 Moderator on at

    HI @wyattdave 

    If you want to follow that location form that response Correct

  • wyattdave Profile Picture
    410 Moderator on at

    Thank you for help but I still don't see how a paragraph from a article about graph API can help my issue with a custom connector that does not use the graph API.

    Would you be able to explain how it does and how that would allow the connector to auto follow the URL.

     

    Thank you again for your support.

  • Yogesh Murugan Profile Picture
    443 Moderator on at

    HI @wyattdave  

    I am already faced this issue..

    Code 302 Return file URL in location filed

    To get Response body > ParseJson > get Location

    Than another API GET call to get file

    Thanks

  • wyattdave Profile Picture
    410 Moderator on at

    Hi @YogeshMurugn ,

     

    I see so you mean to catch the error and then do another http call with the location url. I did this with 2 http actions, but it is not user friendly, i wanted it in one action so that anyone could use it. Is it possible to get the connector to handle it properly, like Postman does?

     

    I was wondering if custom code could but I don't know c# so have no idea?

     

    thank you

  • Verified answer
    wyattdave Profile Picture
    410 Moderator on at

    I managed to create some c# code (with a little help from copilot) that works.

    Detailed it all her: https://powerusers.microsoft.com/t5/Power-Automate-Community-Blog/1-Minute-Fixes-Handling-302-Redirect-urls/ba-p/2622507 

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard