SAP Knowledge Base Article - Public

2831118 - Get 401 Unauthorized error while accessing the API from SAP S/4HANA Cloud system

Symptom

 Get 401 Unauthorized error while accessing the API from SAP S/4HANA Cloud system

Environment

SAP S/4HANA Cloud

Reproducing the Issue

  1. Call the API myxxxxx-api.s4hana.ondemand.com/sap/opu/odata/sap/API_XXX to S/4HANA Cloud system
  2. Input the communication user credentials then get the 401 Unauthorized error

Cause

  • The password is not correct
  • Due to incorrect logon, the user is locked 

Resolution

  • Scenario 1:

Using the correct password, if you do not know the correct password, you can regenerate the password in the "Maintain Communication User" app

  • Scenario 2: 

Open the app "Display Technical User" app to unlock the communication user. If you want to check when the user is locked, please check the user change history in the app "Maintain Communication User"

Keywords

   401 Unauthorized, Maintain Communication User, Display Technical User, incorrect Logon , KBA , BC-SRV-APS-COM , Maintain Communication System and Arrangement , Problem

Product

SAP S/4HANA Cloud 1905