SAP Knowledge Base Article - Public

3832099 - 401 Unauthorized in communication scenario SAP_COM_0203 when requesting current market data – SAP S/4HANA Cloud Public Edition

Symptom

  • Error "OAuth request error: Unauthorized" occurs when running the app Request Current Market Data.
  • Error "401 Unauthorized" occurs when performing Check Connection in the communication arrangement for SAP_COM_0203 (Treasury Market Rate Integration).
  • Authentication method maintained as OAuth 2.0 (Form Field) in the outbound communication settings.
  • OAuth scope left blank; path maintained as /oauth/token; service URL points to a token endpoint.
  • Client ID from the BTP service key is used as the outbound user ID; host name is taken from the service key.

Environment

  • SAP S/4HANA Cloud Public Edition
  • Treasury and Risk Management (Public Cloud)

Reproducing the Issue

  1. Open the communication arrangement for SAP_COM_0203 and run Check Connection; observe "401 Unauthorized".
  2. Start the app Request Current Market Data and attempt to request data; observe "OAuth request error: Unauthorized".

Cause

Resolution

1. We don't need to enter the "Token Endpoint" under the "Outbound OAuth 2.0 Client Settings", therefore, we need to remove the "Token Endpoint".

2. We need to adjust the configuration of "Users for Outbound Communication", in SAP S/4HANA Cloud Public Edition system, for SAP_COM_0203, we have to use the "Authentication Method" as "User name and Password" then enter the mandatory fields (User Name/Client ID and Password).

See Also

Keywords

SAP_COM_0203, 401 Unauthorized, OAuth request error Unauthorized, Request Current Market Data, communication arrangement, Check Connection, market rates, MRM, OAuth 2.0, token endpoint, outbound communication, Treasury Market Rate Integration , KBA , FIN-FSCM-TRM-2CL , Treasury and Risk Management (Public Cloud) , Problem

Product

SAP S/4HANA Cloud Public Edition all versions