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
- Open the communication arrangement for SAP_COM_0203 and run Check Connection; observe "401 Unauthorized".
- 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
- Refer to: KBA 3696766
- Refer to: KBA 3705297
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
SAP Knowledge Base Article - Public