cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

Hi,

I am trying to post data in odata service in s4hana. I am able to do so from POSTMAN, however from SAP CPI i am getting token validation failed error.

I have checked the log and i could see x-csrf-token being passed in odata post call.

Can someone please help me the reason of the error when token in already passed in post call.

Regards

0 Likes
View Entire Topic
AdityaMani51
Participant
0 Likes

Hi Akash,

Can you send header as Cookie with token value and try.

Regards,

Aditya

0 Likes

Hi Aditya,

Tried setting Cookie with token value. However, same error.

Groovy script:

def headers = message.getHeaders();

def x_csrf_token = headers.get("x-csrf-token")

message.setHeader("Cookie", x_csrf_token.toString());

Regards,

Akash