Symptom
You are sending data from Cloud for Customer to SAP ERP/CRM/S4H via Cloud Platform Integration(CPI) and the message fails in CPI with error HTTP 401 Unauthorized.
Environment
- SAP Cloud for Customer
- SAP Cloud Platform Integration
- SAP ERP
- SAP S/4HANA
- SAP CRM
Reproducing the Issue
On the C4C system:
- Login to C4C.
- Go to the Administrator work center.
- Go to the General Setting work center view.
- Open the Web Service Message Monitoring under System Administration
- Select query All
- Check the failed outgoing message with error "HTTP 500 Internal Server Error".
- Navigate to error log, you can find MPL ID.
On the CPI system
- Go to Message Monitor.
- Search with MPL ID captured in the C4C outgoing message.
- You can find the error "HTTP 401 Unauthorized while communicating with XYZ" where XYZ stands for ERP/CRM/S4H URL
Cause
There could be multiple reasons for this problem.
Resolution
- Check the user (Integration user on ERP) has the correct roles(SAP_SD_COD_INTEGRATION or SAP_SD_COD_INTEGRATION_EXT) assigned.
- Check for the user validity if it is expired.
- Ensure that the integration user is not locked.
- Ensure that the password defined for the integration user in CPI/PI is correctly defined.
- Ensure that the CPI client certificate is mapped to the integration user in ERP/CRM/S4H.
- In ERP/CRM/S4H , go to tcode SM30 , open the table VUSREXTID => DN => the filed "min" has either an empty value or is filled with a date(date when the certificate is valid from).
- Ensure that the icm parameters(icm/HTTPS/trust_client_with_subject and icm/HTTPS/trust_client_with_issuer) are maintained(SMICM => Go to => Parameters => Display)
Note: Incase the issue still persists after all the above configuration is in place, we would ask you to create an case from One Support Launchpad to component LOD-HCI.
Clearly mention that the problem is in CPI/PI while sending data from C4C to your On-Premise system.
See Also
Online Help page: SAP Cloud Platform Integration
Keywords
HTTP 401 Unauthorized, 401, Unauthorized, C4C, CPI, Cloud for Customer, S/4HANA, ERP, Cloud for Customer, MPL ID, HTTP 500. , KBA , LOD-CRM-INT-ERP , Integration of C4C with ERP , LOD-CRM-INT-S4H , Integration of C4C with S/4 HANA , LOD-CRM-INT-CRM , Integration of C4C with CRM , Problem
SAP Knowledge Base Article - Public