Troubleshooting – Access token not issued due to missing signing of Message Assertion

Published by Tobias Hofmann on

1 min read


You send a SAML Bearer Assertion to the OAuth token service of SAP Gateway. The Return type is 400 Bad Request.

Error message

    "error": "invalid_grant",
    "error_description": "Provided authorization grant is invalid. Exception was Message Assertion is not signed. For more information, consult the kernel traces or the OAuth 2.0 trouble shooting SAP note 1688545"

Root cause

The error message contains a description of the root cause for the HTTP 400: “Exception was Message Assertion is not signed.” To get more details, an OAuth trace can be performed. Additional information is described in SAP Note 1688545.

Tx: SA38

Click run with variant and select SAP&OAUTH2

Click on Activate and reproduce the issue. To see the result, click on Show.

Alternative to run the report:

Tx: SE38
ICF Service: /sap/bc/sec/oauth2/token
Logon Trace (got HTTP 401): Select
User: OIDCLIENT (the OAuth user of type system)


Activate signing of assertions in Keycloak. Open Keycloak administration console and go to the SAML client. Activate signing of Assertions.

Let the world know

Tobias Hofmann

Doing stuff with SAP since 1998. Open, web, UX, cloud. I am not a Basis guy, but very knowledgeable about Basis stuff, as it's the foundation of everything I do (DevOps). Performance is king, and unit tests is something I actually do. Developing HTML5 apps when HTML5 wasn't around. HCP/SCP user since 2012, NetWeaver since 2002, ABAP since 1998.


Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.