Articles in this section

SAP S/4HANA Cloud FAQ

Q1: Why does my SAP S/4HANA import step fail with a CSRF validation error?

The SAP S/4HANA prebuilt connector import step may fail due to a known issue with CSRF token validation. This occurs because the connector's cookie refresh logic does not correctly handle the CSRF token flow during import operations. 

sc1.png

To resolve this, you can use the following workaround.

Workaround

  1. Open the Import step in your flow.
  2. Switch from Simple view to HTTP view.
  3. In Configure HTTP headers, add the following headers:
  4. Header Value
    Authorization Basic {{{base64Encode (join ':' connection.http.auth.basic.username connection.http.auth.basic.password)}}}
    Accept application/json
  5. Save the import.
  6. Run the flow.

sc2.png

Note

This workaround manually adds the required authorization header to the import request, enabling the connector to complete the CSRF token exchange successfully.