SAP Knowledge Base Article - Public

2675452 - Error "HTTP 401 Unauthorized" Between Cloud Platform Integration and SAP ERP/CRM/S4H When Sending Data from Cloud for Customer to SAP ERP/CRM/S4H

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:

  1. Login to C4C.
  2. Go to the Administrator work center.
  3. Go to the General Setting work center view.
  4. Open the Web Service Message Monitoring under System Administration
  5. Select query All
  6. Check the failed outgoing message with error "HTTP 500 Internal Server Error".
  7. Navigate to error log, you can find MPL ID.


On the CPI system

  1. Go to Message Monitor.
  2. Search with MPL ID captured in the C4C outgoing message.
  3. 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

  1. Check the user (Integration user on ERP) has the correct roles(SAP_SD_COD_INTEGRATION or SAP_SD_COD_INTEGRATION_EXT) assigned.
  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" has either an empty value or is 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 => 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

Product

SAP Cloud for Customer core applications all versions