SAP Knowledge Base Article - Public

3718383 - Connection to service failed: Odata Services" occurs when trying to configure an Data Import connection with using a Technical User Purpose Type to SAP Datasphere in SAP Analytics Cloud

Symptom

  • Since Q3-Q4 2025 Technical Usage is supported as a Purpose Type for creating an OAuth Client in Datasphere that would be used in SAP Analytics Cloud.
  • A connection has already been established using an OAuth Client with Interactive Usage Type as mentioned in KBA  3563695  - How to create OData connection to SAP Datasphere in SAP Analytics Cloud (SAC) - SAP for Me and SAP HELP Guide Using the Datasphere OData API with SAP Analytics Cloud;
  • However as there are certain limitations with selecting Interactive Usage Type, including the maximum refresh token lifetime of 180 days as mentioned in KBA 3392890 -  Security improvement on OAuth Client Token Lifetime in SAP Analytics Cloud (SAC) - SAP for Me
  • With Technical Purpose Type however the maximum refresh token lifetime can expire even in +30 years.
  • Due to the above and other requirements you would like to use a Technical Usage Type (Using Technical User in SAP Datasphere Consumption... - SAP Community) when creating an OAuth Client in Datasphere. 

Environment

  • SAP Analytics Cloud 
  • SAP Datasphere

Reproducing the Issue

  1. Create an OAuth2.0 Client with a Technical User purpose in your SAP Datasphere tenant.
  2. Use the same OAuth Client credentials to set up an OData service connection in SAP Analytics Cloud.
  3. Attempt to save the connection.
  4. In the Browser Console log and the UI you can see the following exception: "An error occured while connecting to the data source: An error occurred while fetching metadata: Authentication failure. Try authenticating again."

Cause

The issue occurs due to routing problems with the format of the Data Service URL when using OAuth Client credentials with Technical User Purpose or/and missing Scope & Datasphere Space assignments for the Technical User.

Resolution

  1. Ensure that the OAuth Client is created with Technical User purpose and proper scoped roles are assigned, such as DW Scoped Viewer or a custom role with permissions for Data Warehouse Consumption (-R------), Space Files (-R------).
  2. Select the correct OData Service URL, as the following format: https://<TenantURL>.cloud.sap/api/v1/dwc/consumption/relational/<SpaceID>/<View>
    1. The same URL retrieved from "Generate OData Request" > "Service"
  3. Save the updated connection configuration and verify if the issue is resolved.
  4. If the issue persists, please open a case at component LOD-ANA-AQU-ODATA.

See Also

Keywords

odata connection error, sac odata import, technical user, authentication failure, connection to service failed, oauth client credentials, data service url, sac monitoring traces, har traces, sac datasphere integration, sac planning , KBA , LOD-ANA-AQU-ODATA , Acquiring Data into SAC using an ODATA connection , DS-DI-CON , Connections , Problem

Product

SAP Analytics Cloud all versions ; SAP Datasphere all versions