SAP Knowledge Base Article - Public

3023224 - Error: "HTTP 400 Bad Request" occurs when sending GET request to retrieve users against .../api/v1/scim/Users

Symptom

  • Error: "HTTP 400 Bad Request" occurs when sending GET request to retrieve users against .../api/v1/scim/Users

Environment

  • SAP Analytics Cloud 2020.21.14

Reproducing the Issue

  1. Create GET request to retrieve bearer token against URL .../oauth/token?grant_type=client_credentials

    conn = (HttpsURLConnection) url.openConnection();
    conn.setRequestMethod("GET");
    conn.setRequestProperty("Authorization", String.format("Basic %s", new String(Base64.encodeBase64(loginPasswd.getBytes()))));
    conn.setRequestProperty("Accept-Charset", "UTF-8");
    conn.setRequestProperty("Content-Type", "application/json");
    conn.setRequestProperty("Accept", "application/json");
  2. Send GET request to retrieve users against .../api/v1/scim/Users usnig bearer token retrieved in step 1:

    conn = (HttpsURLConnection) url.openConnection();
    conn.setRequestMethod("GET");
    conn.setRequestProperty("Authorization", "Bearer " + bearerToken);
    conn.setRequestProperty("x-sap-sac-custom-auth", "true");
    conn.setRequestProperty("Accept-Charset", "UTF-8");
    conn.setRequestProperty("Content-Type", "application/json");
    conn.setRequestProperty("Accept", "application/json");
  3. As a result list of users is returned, however exactly the same code and libraries used on one PC works fine, but when it's executed from another PC, then step 1 is executed OK but in step 2 server returns HTTP 400 Bad Request. This code used to work fine on the second PC for one month and broke down suddenly.

Cause

This issue is currently under investigation by Development.

Resolution

This issue is currently under investigation by Development.

See Also


Your feedback is important to help us improve our knowledge base.
Please rate how useful you found this article by using the star rating feature at the beginning of this article.
Thank you.

Keywords

HTTP 400 Bad Request, GET request, API, Cloud for Analytics, Cloud4Analytics, CloudforAnalytics, Cloud 4 Planning, BOC, SAPBusinessObjectsCloud, BusinessObjectsCloud, BOBJcloud, BOCloud., SAC, SAP AC, Cloud-Analytics, CloudAnalytics, SAPCloudAnalytics , KBA , LOD-ANA-ADM , SAC Administration , Problem

Product

SAP Analytics Cloud 1.0