SAP Knowledge Base Article - Public

3324055 - API requests failing with LGN0021


You run an interface, integration or job that is calling SF API and failing intermittently, giving 401 - Unauthorized error or 500 - Internal Server Error.

Sample Error Message: [LGN0021]Authentication failed. An internal error has occurred. Please contact SAP support.

Example API endpoint called:


  • SAP SuccessFactors HXM Suite
  • OData API

Reproducing the Issue

  1. Run an interface calling the API of SF or repeat the same query using Postman
  2. You will be prompted with the 'LGN0021' error code in the API response


The issue is most likely happening due to maintenance activity on our end.


What to check and look for:

1. As a first step, please check if the issue is intermittent or persistent. Are you able to reproduce the issue?

Note: You may not be able to reproduce the issue upon request due to its nature (intermittent error during maintenance), please proceed with Step 2.

2. Check the timing of these errors and if you notice it is periodically recurring and not random at all (for instance occurring every weekend) it could be due to maintenance.


Expected behavior if it's part of the maintenance window. All customers should expect error during this window, no incident/ticket should be reported.

Should you deem that is not maintenance related (occurance is completely random or scheduled interface works fine but manual run is failing), please create a ticket to LOD-SF-INT.


LGN0021, [LGN0021]Authentication failed, internal error, Unauthorized, 401, 500 , KBA , LOD-SF-INT-ODATA , OData API Framework , LOD-SF-INT , Integrations , LOD-SF-INT-API , API & Adhoc API Framework , Problem


SAP SuccessFactors HCM all versions