SAP Knowledge Base Article - Public

3705297 - Error "OAuth request error: Unauthorized" in Market Rates Management - SAP S/4HANA Cloud Public Edition

Symptom

  • When attempting to fetch a token for Market Rates Management, the system returns error "OAuth request error: Unauthorized".
  • The connection check fails in the communication scenario SAP_COM_0203.

Environment

SAP S/4HANA Cloud Public Edition

Reproducing the Issue

  1. Navigate to Request Current Market Rate Data - Datafeed.
  2. Observe the connection logs or the error message: "Unauthorized" or "Fetch Token Error."
  3. Check the Communication Arrangement for scenario SAP_COM_0203.
  4. Perform a connection check; notice the failure.

Cause

The issue is caused by a mismatch between the Service Key generated in the SAP Business Technology Platform (BTP) and the credentials maintained in the SAP S/4HANA Cloud Communication System.

Resolution

  1. Verify the following credentials from the BTP side:
    • Client ID
    • Client Secret
    • Token URL (Authentication URL)
  2. Open the Communication Arrangements app in Fiori Launchpad and locate the communication scenario SAP_COM_0203.
  3. Ensure the OAuth 2.0 Client ID and Client Secret match the BTP Service Key exactly.

Note: Ensure there are no leading or trailing spaces when pasting the strings.

Keywords

SAP_COM_0203; MRM; Market Rates Management; Fetch Token Error; 401 Unauthorized; OAuth request error: Unauthorized; BTP Service Key; Client ID; S4H_PC; FIN-FSCM-TRM-CNT. , KBA , FIN-FSCM-TRM-CNT , S4H Best Practices for Treasury and Risk Management , Problem

Product

SAP S/4HANA Cloud Public Edition all versions