SAP Knowledge Base Article - Public

3840094 - HTTP 500 when calling OData V2 API_BUS_SOLUTION_ORDER_SRV with OAuth2 Authorization Code + PKCE - SAP S/4HANA Cloud Public Edition

Symptom

  • Calling the OData V2 service API_BUS_SOLUTION_ORDER_SRV with OAuth2 Authorization Code + PKCE returns HTTP 500 Internal Server Error.
  • The same API returns HTTP 200 OK when called with Basic Authentication.
  • The corresponding OData V4 Business Solution Order A2X service responds with HTTP 200 OK when used with OAuth2 Authorization Code + PKCE.

Environment

SAP S/4HANA Cloud Public Edition

Reproducing the Issue

  1. Obtain an OAuth2 access token using the Authorization Code grant with PKCE.
  2. Send a request to the OData V2 service.
  3. Observe that the response is an HTTP 500 Internal Server Error.

Cause

OAuth2 Authorization Code with PKCE is not supported for the OData V2 API API_BUS_SOLUTION_ORDER_SRV.

Resolution

  1. To consume the OData V2 API (API_BUS_SOLUTION_ORDER_SRV), use a supported inbound authentication method such as Basic Authentication.
  2. If OAuth2 Authorization Code with PKCE is a requirement, switch to the OData V4 Business Solution Order A2X service and call its OData V4 endpoint with PKCE.

Keywords

OData V2, API_BUS_SOLUTION_ORDER_SRV, HTTP 500, Internal Server Error, OAuth2, PKCE, Authorization Code, Basic Authentication, Solution Order, Communication Arrangement, $metadata, Business Solution Order, OData V4, A2X, api_businesssolutionorder , KBA , CRM-S4-SOL-SLO , S4CRM: Solution Order , Problem

Product

SAP S/4HANA Cloud Public Edition all versions