K2 integration with SAP

  • 8 October 2019
  • 4 replies


I am trying to create a CRUD workflow using K2 and SAP. On SAP side we have exposed the functionality as OData service. I followed the video and set up the OData Service broker as Service instance in K2. The SmartObject generated lists all the CRUD operations and the list function executes without any issues. The other operations create/update/delete fail with a message - CSRF token validation failed.

As per the article -

the list function which is a non-modifying request sends a request header property x-csrf-token=fetch and retrieves a CSRF token. This token should be then used as request header property for the modifying requests. 

How can I set this up ? 

I have not found much information on CRUD operations for K2 + SAP using OData so any help is much appreciated. 

4 replies

Userlevel 3

Hi ns1


Check the attached link below: 




Thank you for your quick reply. I did see that article but this involves code updates and also we are using K2 Cloud rather than K2 Five. Does it still apply ?


Can anybody help in retrieving a response header from a OData SmartObject ? I can then get the csrf token sent by SAP Gateway.

We got round the issue by not passing x-csrf-token not ideal but atleast we got something running. I did manage to retrieve response headers but K2 does not supply them for list method.