SAP Knowledge Base Article - Public

3407475 - API refresh token lifetime reset not working properly in SAP Analytics Cloud (SAC).

Symptom

  • Refreshing the import job fails from SAP datasphere.
  • After the generation of the access token for import connectivity from SAP datasphere the validity of refresh token on SAC side is not renewed for additional 30 days.

Environment

SAP Analytics Cloud 2.0

Datasource: SAP Datasphere.

Reproducing the Issue

  1. Log in to SAC
  2. Open the model.
  3. Switch to Data Management.
  4. Select the import job and refresh it.
  5. Refresh jobs fails with the connectivity error.

Cause

The import job fails because the connection is terminated after 30 days since the refresh token expires.

Resolution

  • If a refresh token expires, then the only way to renew it is to ask the user to log in again, starting a new OAuth flow from scratch, which will issue a new access token and refresh token.
  • So, the refresh token is only valid for 30 days from entering the secret in the connection dialog and it won’t be renewed each time the refresh job takes place.
  • Thus creating a new access token will NOT renew the refresh token. 
  • When initially trying to obtain an OAuth access token by sending an HTTP POST request to DWC using OAuth Client ID and Secret, SAC also receives a refresh token. The presence of the refresh token means that SAC will be able to get a new access token from DWC without the user’s interaction if the access token will expire in 1 hour. Meanwhile, the refresh token will be kept valid in 30 days (720 hours) since the previous log on using OAuth Client ID and Secret.
  • We request you to use our BTP influence tool to submit improvement requests:2424376 - How do you create an enhancement request and provide feedback for SAP Analytics Cloud? - SAP for Me 
  • 0000000011 - Would you like to shape & influence future releases of SAP Products?

See Also

Keywords

SAC, API, OAuth, Connection, DWC, access token, refresh token. , KBA , LOD-ANA-AQU , Import Data Connections (Acquiring Data) , Product Enhancement

Product

SAP Analytics Cloud 1.0