Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

CSRF Token Validation Failed Error in REST Connector

SanketBhandhari
New Contributor
New Contributor

Hi All,

We are using REST connector for one of our applications.

We are getting below error in tasks of that application.

"message":{"error":{"code":"","message":{"lang":"en","value":"The server has not found any resource matching the Data Services Request URI"}}},"statusCode":404,"description":null,"status":"Success"},"call2":{"headers":null,"message":{"responseMessage":"CSRF token validation failed"},"statusCode":403,"description":null,"status":"Failed"}}

Can someone suggests where we need to make changes in our connector?

Is it ConnectionJSON where we need to update "accessToken":"Basic <<TOKEN>>" or is it at somewhere else?

Thanks in advance!

Regards,

Sanket Bhandhari

3 REPLIES 3

rushikeshvartak
All-Star
All-Star

share postman screenshot of auth & connection json


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

SanketBhandhari
New Contributor
New Contributor

Hi @rushikeshvartak ,

Thanks for the reply.

I don't have postman information with me as we are handed over this just now, I am checking with previous team about postman details.

For ConnectionJSON, please find below

{
"authentications":{
"acctAuth":{
"authType":"Basic",
"url":"<<URL>>",
"httpMethod":"GET",
"httpParams":{

},
"httpHeaders":{

},
"httpContentType":"text/html",
"properties":{
"userName":"USERNAME",
"password":"PASSWORD"
},
"expiryError":"ExpiredAuthenticationToken",
"authError":[
"InvalidAuthenticationToken",
"AuthenticationFailed"
],
"timeOutError":"Read timed out",
"errorPath":"error.code",
"maxRefreshTryCount":1,
"tokenResponsePath":"access_token",
"tokenType":"Basic",
"accessToken":"Basic <<TOKEN>>",
"apiRateLimitConfig":{
"retryAfterCalls":1,
"retryWaitSeconds":60
}
}
}
}

 

Regards,

Sanket Bhandhari

Rajesh-R
Saviynt Employee
Saviynt Employee
  1. Looks like there are multiple calls in your request.
  2. First call is giving 404 and second call is giving 403
  3. Are you passing something from the response of first call to the second call and the first call is failing here. Hence you are seeing a 403 on the second call?

Normally CSRF error occurs if the cookies is stored and wrong cookies are passed while sending a REST Request. Is the REST implementation Cookie-Aware while calling the API?

For further analysis need screenshots of Connection, call1, call2 using Postman.


Thanks
Rajesh Ramalingam
Saviynt India