SAP Knowledge Base Article - Preview

3810636 - OAuth2 error in multi-country DRC with separate BTP tenants - SAP ERP

Symptom

  • eInvoice submission from an ERP system fails with an OAuth2 authentication error in a multi-country Document and Reporting Compliance (DRC) deployment
  • Two countries are configured on the same ERP system but on different BTP subaccounts (for example, Country A on one BTP tenant and Country B on another), resulting in two OAuth2 configuration names under a single communication profile
  • Submission works for one country (the country whose OAuth2 configuration matches the default name) but fails for the other country
  • The receiving BTP tenant rejects the token and closes the connection because the token presented belongs to the other tenant
  • Issue occurs only on SAP ERP; the equivalent multi-tenant scenario works on SAP S/4HANA


Read more...

Environment

  • SAP ERP
  • SAP Document Reporting and Compliance service
  • SAP Document and Reporting Compliance, cloud edition

Product

SAP Document and Reporting Compliance service all versions ; SAP Document and Reporting Compliance, cloud edition all versions ; SAP ERP all versions

Keywords

DRC, Document and Reporting Compliance, eInvoice, eDocument, OAuth2, OAuth 2.0, authentication error, multi-country, multi-tenant, BTP tenant, BTP subaccount, GCO_ECOM_CONNECTOR, GCO_ECOM_HTTP_CLIENT_FACTRY, CREATE_OAUTH2, add_token, build_http_client, SET_OAUTH_TOKEN, CL_HTTP_CLIENT, IF_GCO_ECOM_CONSTANTS, GCO_ECOM_OAUTH_PROFILE, GLO_GEN_GCO_COMMUNICATION, communication profile, OAuth2 configuration, token override, connection closed, SAP_APPL, ERP, S/4HANA, cloud edition, France, Malaysia, EU02, EU10, pilot note, 3810407, 3596911, 3289969, CA-GTF-CSC-DRC-COM , KBA , CA-GTF-CSC-DRC-COM , Document and Reporting Compliance Communication to Cloud , Problem

About this page

This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).

Search for additional results

Visit SAP Support Portal's SAP Notes and KBA Search.