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 Hybris Cloud for Customer
- Cloud Platform Integration
- SAP ERP
- S/4HANA
- CRM
Reproducing the Issue
Steps in C4C
- Login to C4C.
- Go to Webservice Message Monitoring.
- Check the failed outgoing message with error "HTTP 500 Internal Server Error".
- Navigate to error log, you can find MPL ID.
Steps in CPI
- Login to CPI.
- Go to Message Monitor.
- Search with MPL ID captured in the C4C outgoing message.
- You can find the error "HTTP 401 Unauthorized while communciating with XYZ" where XYZ stands for ERP/CRM/S4H URL
Cause
There could be multiple reasons for this problem. Check the below mentioned points, you should be able to identify the 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 => GoTo => Parameters => Display)
Note : Incase the issue still persists after all the above confiuration 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" "401 Unauthorized" , 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