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 Apps / How do we handle statu...
Power Apps
Unanswered

How do we handle status code is 301 in HTTP Action?

(0) ShareShare
ReportReport
Posted on by 332

Repro:

Create new flow

Use PowerApps trigger

The results of the repro steps below took a while to get my pea brain around, but it looks like one has to be very careful when passing urls to HTTP Actions. Doing a GET with http://microsoft.com returns 301, and using http://www.microsoft.com returns 302. in either case, absent a Condition in my flow, the Action returns a Failed result.

 

Btw, Postman returns 200 for both versions of the microsoft.com url.

 

 

Steps:

Add HTTP action

Set Uri field to "Ask in PowerApps"

Name as "HTTP GET" and Save

 

Create new PowerApp

Add button

Bind button Action to Flows

Use "HTTP GET" flow

Enter "http://microsoft.com" as parameter for Run()

Preview app

Review results of flow execution

 

Unexpected Results in Flow information:

 

Inputs
Method
GET
URI
http://microsoft.com

Outputs
Status code
301
Headers
{
"Date": "Fri, 11 Nov 2016 01:45:16 GMT",
"Location": "http://www.microsoft.com/",
"Server": "Microsoft-IIS/8.5",
"X-Powered-By": "ASP.NET",
"Content-Length": "148",
"Content-Type": "text/html; charset=UTF-8"
}
Body
<head><title>Document Moved</title></head>
<body><h1>Object Moved</h1>This document may be found <a HREF="http://www.microsoft.com/">here</a></body>

Categories:
I have the same question (0)
  • v-monli-msft Profile Picture
    Microsoft Employee on at

    Hi mcorning,

     

    Using raw HTTP is the most advanced functionality we have. If you have an existing REST API I would recommend describing it in a swagger JSON file and then using it that way. If you do that you'll get the full experience inside a flow, including appropriate input fields and tokens. Swagger is an open spec (read more here: https://openapis.org), and is becoming the de-facto standard for describing APIs.

     

    For more detailed information about how to use the HTTP action to make requests with Microsoft Flow, please refer to the following 2 links:

    https://flow.microsoft.com/en-us/blog/http-card-tutorial/

    https://powerusers.microsoft.com/t5/Flow-Forum/Example-Http-action/td-p/1105

     

    Regards,

    Mona Li

  • mcorning Profile Picture
    332 on at
    The only time I've been able to use a swagger file was through the upload button when creating a new custom connector in powerapps.

    All the articles I've read tonight (including links you provided) assume we rookies know how to get a swagger file into our azure resources.

    So if detailed docs are out there, they could be more discoverable.

    And if you guys recommend using API Management for swagger uploads, you'll have to get that resource creation process to work again. It's broken tonight.

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 431

#2
WarrenBelz Profile Picture

WarrenBelz 360 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 280 Super User 2026 Season 1

Last 30 days Overall leaderboard