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
- Navigate to Request Current Market Rate Data - Datafeed.
- Observe the connection logs or the error message: "Unauthorized" or "Fetch Token Error."
- Check the Communication Arrangement for scenario SAP_COM_0203.
- 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
- Verify the following credentials from the BTP side:
- Client ID
- Client Secret
- Token URL (Authentication URL)
- Open the Communication Arrangements app in Fiori Launchpad and locate the communication scenario SAP_COM_0203.
- 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
SAP Knowledge Base Article - Public