SAP Knowledge Base Article - Preview

3009886 - Provided authorization grant is invalid

Symptom

Destination check to ABAP system in BTP NEO gives error:
Unexpected Token Service response code. Token Service error response: "Provided authorization grant is invalid. Expection was Error in ST grogram SAML2_ASSERTION when importing XML data. For more information, consult the kernal traces or the OAuth 2.0 trouble shooting SAP note 1688545". Check the configuration or contact Token Service owner." Received status code: "400"

in ABAP traces (from note 1688545 - OAuth 2.0 Server in AS ABAP Troubleshooting) error can be seen:

OAUTH2: Element '{urn:oasis:names:tc:SAML:2.0:assertion}AuthnContext' missing
OAUTH2: Source position: SAML2_ASSERTION===============XT 59
OAUTH2: Error in ST program SAML2_ASSERTION when importing XML data
OAUTH2: Source position: CL_SAML20_OAUTH_ASSERTION=====CM006 56
OAUTH2: Error! CX_OAUTH2_EXCEPTION thrown, time: 20210104 112720
OAUTH2: Error Text: Provided authorization grant is invalid. Exception was Error in ST program SAML2_ASSERTION when impo
OAUTH2: rting XML data. For more information, consult the kernel traces or the OAuth 2.0 trouble shooting SA
OAUTH2: P note 1688545
OAUTH2: HTTP Status Code: 400
OAUTH2: error_description: Provided authorization grant is invalid. Exception was Error in ST program SAML2_ASSERTION when import
OAUTH2: error: invalid_grant


Read more...

Environment

  • SAP Cloud Platform Connectivity
  • SAP NetWeaver ABAP

Product

SAP Business Technology Platform all versions

Keywords

SAP BTP, Business Technology Platform, Provided authorization grant is invalid, destination, OAuth2SAMLBearerAssertion, NEO , KBA , BC-CP-DEST-NEO , Destination service for Neo environment , BC-SEC-LGN , Authentication , Problem

About this page

This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).

Search for additional results

Visit SAP Support Portal's SAP Notes and KBA Search.