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.
SAP Hybris Cloud for Customer
Reproducing the Issue
Steps in C4C
1) Login to C4C
2) Go to Webservice Message Monitoring
3) Check the failed outgoing message with error "HTTP 500 Internal Server Error"
4) Navigate to error log, you can find MPL ID
Steps in CPI
1) Login to CPI
2) Go to Message Monitor
3) Search with MPL ID captured in the C4C outgoing message
4) You can find the error "HTTP 401 Unauthorized while communciating with XYZ" where XYZ stands for ERP/CRM/S4H URL
There could be multiple reasons for this problem. Check the below mentioned points, you should be able to idetify the problem
1) Check the user(Integration user on ERP) is having correct roles(SAP_SD_COD_INTEGRATION or SAP_SD_COD_INTEGRATION_EXT)
2) Check for the user validity if it is expired
3) Ensure that the integration user is not locked
4) Ensure that the password defined for the integration user in CPI/PI is correctly defined
5) Ensure that the CPI client certificate is mapped to the integration user in ERP/CRM/S4H
6) In ERP/CRM/S4H , go to tcode SM30 , open the table VUSREXTID => DN => the filed "min" will either have an empty value or will be filled with a date(date when the certificate is valid from)
7) 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, you can create an incident from One Support Launchpad to component LOD-HCI.
Clearly mention that the problem is in CPI/PI while sending data from C4C to On-Premise system
"HTTP 401 Unauthorized" ; "401" ; "Unauthorized" "401 Unauthorized" , KBA , LOD-CRM-INT-ERP , Integration of C4C with ERP , LOD-CRM-INT-CRM , Integration of C4C with CRM , LOD-CRM-INT-S4H , Integration of C4C with S/4 HANA , Problem