cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
pipa
New Member

Unable to send x-csrf-token in POST request

Hi Experts, 

 

I am trying to send POST request using HTTP connector. The Odata API required x-csrf-token to be sent as well. I could fetch token from previous GET request and trying to pass it to subsequent POST request. Though I could see it as input, API returns with a message 403 and CSRF token validation failed. The same works with POSTMAN. Please suggest.

Input :

pipa_0-1645209331757.png

 

Raw input :

pipa_3-1645209491550.png

 

Output

pipa_2-1645209382676.png

 

Regards,

 

3 REPLIES 3
japel
New Member

Had the same issue for days and figured it out today:

 

You need to submit the session cookie, which you will find in the "set-cookie" header of your GET request. 

This needs to be passed to the POST request. Unfornately this can't be done using a custom connector. 

I used a normal http request for this. You can set a Cookie Attribute there.

For the info from "set-cookie" you need to replace "," with ";" before passing it to your POST-Request. 

TM82
Frequent Visitor

can you plz elaborate and give the syntax for the post method

VD
Helper IV
Helper IV

Is it resolve? I am also getting the same error.

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (5,206)