SAP Knowledge Base Article - Public

2872019 - [LGN0022]The access token is either rejected or expired - SuccessFactors HXM Suite

Symptom

Your SuccessFactors OData OAuth call is returning the following errors:

  • [LGN0022]The access token is either rejected or expired
  • Exception: Invalid token

Environment

  • SAP SuccessFactors HXM Suite
    • OData API
    • OAuth 2.0

Resolution

The error message means your process that generated this token was correct, but the API call make was after the expiration date.

Please evaluate your process to create another token (bearer) before the next API call or reduce the interval between the API token generation and the API call done with this token.

Please also check if you tried to regenerate one new token ("New access token retrieved for OData context") and in the response you had the same OldToken and NewToken. If yes, the solution for that is using the parameter: new_token=true

If you have already requested an access token with the same SAML assertion and the token hasn't expired yet, your request returns the same token by default with the remaining time indicated in the expire_in field. You can use parameter new_token=true to force the server to generate a new access token valid for 24 hours. This parameter is documented in the Requesting an Access Token guide page.

Keywords

[LGN0022]The access token is either rejected or expired, SuccessFactors OData OAuth OAuth2, API, new_token=true, new token, OldToken, NewToken HCM HXM Suite , KBA , LOD-SF-INT-ODATA , OData API Framework , LOD-SF-INT , Integrations , How To

Product

SAP SuccessFactors HCM Suite all versions