on 2021 Sep 27 11:59 AM
Hi Experts,
We are working on the below requirement to fetch data from ARIBA Open API's to SAP CPI and then post it to SAP Data Intelligence (DI).
Interface flow
SAP(DI) --> SAP CPI --> SAP Ariba Open API's

SAP CPI-PI iFlow: (Referred the below link to setup the connection in SAP DI)
Within SAP DI, we have configured the CPI connection type which allows the following actions.
Connection to SAP CPI was setup, performed testing and could see the connection is successful.
When we execute the flow in SAP DI, we get the below errors and the request is not reaching to SAP CPI to trigger the iFlow.
Error1 details: when CSRF Protected was unchecked
The below error occurs when the CSRF protected was unchecked in the HTTPS channel.
could not fetch CSRF token, server responded with status code 401. please check credentials and connection details. in SAP data intelligence.
Error 2 details : When CSRF protected was checked in the HTTPS channel.

We have checked the SAP CPI user and could see the role "ESBMessaging.send" was already assigned.
Do we need to enable the CSRF protection in SAP DI? Is this mandatory or not?
Any configuration required in SAP CPI for SAP DI?
Please provide your valuable suggestions to resolve the issue.
Thanks in advance.
Regards
Bhargava Krishna
Request clarification before answering.
Hello @Bhargavakrishna @Muniyappan
Is it possible to connect from SAP DI to SAP CPI using CPI-PO operator?
or
CPI can use https sender(BW4System and TokenService) to consume data from BW4HANA ADSO directly?
Please throw some heavy light since this topic is too non transparent.
Flow: BW4HANA -> SAP DI -> SAP CPI -> S4HANA /ECC
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bhargava,
If you use non modifiying method like get/head then this CSRF plays no role whether you select it or unselect it.
First test the ilfow using post man with same user/different user to check if it only happens when calling from sender.
Even CSRF is checked and if sender uses post method, error code should be 403 not 401.
https://blogs.sap.com/2019/06/11/inbound-https-with-csrf-protection-in-cpi-integration-flows/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 7 | |
| 5 | |
| 5 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.