cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
cah2035
Helper III
Helper III

HTTP POST failed with 403 error, but works fine in Postman

I finally figured out how to run my request successfully in postman (I have to have their Host, Content-Type, and Content-Length headers selected). Now I cannot get it to work in Flow or as a custom connector. I have tried putting content-type, length, and host in the headers and in the body and it has not worked. Continually getting a 403 error. I am new to making HTTP requests, so if there is any other information that would help, let me know. Thanks!

 

Screenshot 2021-01-25 195339.png

2 REPLIES 2
laura-borbolla
Microsoft
Microsoft

Hi!


I am not sure of what connector you are using, but here are some quick checks:

  1. Are you using the HTTP with Azure AD? A 403 could mean that your authentication is not correctly set; as stated in the limitations of this connector, if you are using AD credentials, might not have the correct scopes, try with HTTP connector.
  2. Are you using the HTTP connector? Make sure that you are setting the correct Authorization header; I suggest to start with a GET request to make tests (usually, they are simpler).
  3. If you created a custom connector, in the test tab, you can see the request your connector is sending and all the headers is attaching, I suggest sending that exact same request in Postman to make sure is working.

 

 

Hi Laura, thanks for your reply. 

 

I am using the HTTP action under the HTTP category. I am trying to access a site run by my institution, and their instructions require a POST request rather than get (even though this request is technically just to get data from their site). 

I have tried doing this both in Power Automate with the HTTP action as well as trying to create a custom connector which is even more confusing to use, and I get the same 403 response in both. When I first started doing this, I started with postman and was getting the same 403 error. As stated in the original post, I discovered that the request required the headers for Content-Type, Content-Length, and Host to get the request to work (these are three headers that are provided by postman, so I did not put any data in these headers myself. In fact, there were no other headers I included, the only information I put in was the body of the request. 

Since all of the headers shown in the postman request above have values that are generated by postman itself, I am not sure how I would establish these headers in the flow. 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (2,326)