SAP Knowledge Base Article - Preview

3837547 - CSRF token is invalid (HTTP 403) when replicating FSM maintenance orders via OData V4 to S/4HANA

Symptom

When replicating a maintenance order from SAP Field Service Management (FSM) to SAP S/4HANA using the standard integration flow Replicate_Plant_Maintenance_Call_from_SAP_Field_Service_Management_to_SAP_S4HANA in SAP Integration Suite (Cloud Integration), the OData V4 POST request to CreateMaintenanceOrder fails with HTTP status code 403.

The following error message appears in the SAP Integration Suite monitoring log:

  • Error code: /IWBEP/CM_V4H_RUN/042
  • Error message: "CSRF token is invalid"
  • Exception category: CSRF_Token_Missing

Full response payload:

{"error":{"code":"/IWBEP/CM_V4H_RUN/042","message":"CSRF token is invalid","@SAP__common.ExceptionCategory":"CSRF_Token_Missing"}}

The error occurs even though the integration flow correctly performs a GET request to fetch the Cross-Site Request Forgery (CSRF) token and session cookies before the POST call. The token and cookies appear to be correctly forwarded, yet the S/4HANA backend still rejects the request.

This issue specifically affects OData V4 APIs when the virtual host configured in SAP Cloud Connector does not use a Fully Qualified Domain Name (FQDN).


Read more...

Environment

  • SAP Field Service and Asset Management 1.0
  • SAP S/4HANA (Private Cloud or On-Premise)
  • SAP Integration Suite (Cloud Integration / CPI)
  • SAP Cloud Connector

Product

SAP Field Service and Asset Management 1.0

Keywords

CSRF token invalid, HTTP 403, OData V4, FQDN, Cloud Connector virtual host, IWBEP/CM_V4H_RUN/042, maintenance order replication, FSM S/4HANA integration, CSRF_Token_Missing, CreateMaintenanceOrder , KBA , CRM-S4-INT-FSM , S4CRM: Service Integration with Field Service Mgmt , Problem

About this page

This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).

Search for additional results

Visit SAP Support Portal's SAP Notes and KBA Search.