I receive XSRF check failed for POST Requests using power automate

Nessrine Hafi March 29, 2023

Hello, Dear community, 

I'm currently creating a custom connector for my project. I managed to get data from my project using my connector but for issue creation or adding comments I always get an XSRF check failed even though I added X-Atlassian-Token: no-check as it was recommended by this article https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro#special-request-headers. But the problem still persists. I've tested adding a comment using postman and it worked. 

Here's my header: 

{
  "Authorization": "Bearer <Token>,
  "User-Agent": "PowerApps",
  "Content-Type": "application/json",
  "X-Atlassian-Token": "no-check"
}

please is there anyone who's familiar with this problem? 

3 answers

0 votes
Bruno Scota De Carvalho
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 18, 2024

I had the same error and I solve this just setting the header Origin as the same as the request host

{
  "Authorization": "Bearer <Token>,
  "User-Agent": "PowerApps",
  "Content-Type": "application/json",
  "X-Atlassian-Token": "no-check",
  "Origin": "https://my-jira-host.com/rest/api/2/issue"
}

0 votes
craigsparks37 January 15, 2024

I'm facing the same issue.

Doing the calls (GET/POST) from Postman is perfectly fine.

From Power Automate Desktop invoke web service:

When I do a GET it is fine... 

When I do a Post I get the XSRF check failed...

 

I'll update if I find something.

craigsparks37 January 15, 2024

After a lot of digging and finding no real way to solve this, I decided to open cmd sessions, and run curl to hit the REST Api... working well.

0 votes
Ahmed Younis
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 3, 2024

hello @Nessrine Hafi  i am facing the exact same issue , did you manage to find a solution ?

Suggest an answer

Log in or Sign up to answer