SAP Knowledge Base Article - Public

3598375 - Unable to establish multiple connections using the same parameters to S/4HANA Cloud in SAP Analytics Cloud (SAC)

Symptom

  • It is not possible to create multiple connections using the same connection information to S/4HANA Cloud using the OAuth type in SAC.

  • First connection works fine, and after adding a second connection with exactly the same parameters, the following error message appears:

    "invalid_grant,
    Provided authorization grant is invalid.Exception was The assertion has already been consumed.For more information,
    consult the kernel traces or the OAuth 2.0 trouble shooting SAP note 1688545"

Environment

  • SAP Analytics Cloud (Enterprise)
  • SAP S/4HANA Public Cloud
  • OAuth 2 SAML Bearer Assertion

Reproducing the Issue

  1. Logon to SAC.
  2. Create a connection to S/4HANA Public Cloud with OAuth authentication. 
  3. Notice that it works fine.
  4. Attempt to create a second connection to the same S/4HANA system using the same connection parameters.
  5. Notice that it fails with the error message that the assertion has already been consumed.

Cause

  • This is a by-design behavior in SAC.

  • SAML2.0 Bearer Token can be used once, as the OAuth authentication flow can only take the same token once. Attempting to use the same token will show the error message that it has already been consumed. 

Resolution

  • Create another Communication User in S/4HANA Cloud with another Configured Client (SAC --> App Integration) as the new Client Key and Secret will have a dedicated SAML2.0 Bearer token. 

  • With a second Communication User, you will be able to create another Live Connection to the same S/4HANA Cloud system.

See Also

Your feedback is important to help us improve our knowledge base.

Keywords

live, saml, s4hc, oauth, bearer, token, public, auth, , KBA , LOD-ANA-LDC-HAN , SAC Live Data Connection HANA , Problem

Product

SAP Analytics Cloud all versions