SAP Knowledge Base Article - Public

3080189 - SFAPI + OAuth with error Authentication failed, no API login permission(status code = 14)


You are trying to login with OAuth in the SFAPI following the sample of the KBAs 3043111 or 2320264 and in the response you are getting the following error:

  • Authentication failed, no API login permission(status code = 14)

You already checked and your user already have the RBP permission for SFAPI login according KBA 2289037 and you still cannot resolve the issue.


  • SAP SuccessFactors HXM Suite
    • OAuth
    • SFAPI


SFAPI User Login permission check is based on username.

This was fixed by SF engineering in API code and will be ready in 2H 2021 release. 


If your API user have username and user_id values equal, you will not notice this issue.

  • In the OData OAuth, sample on KBA 2800150, we use the "user_id" value to request the idp.
  • For the SFAPI OAuth, we need to use the "user_id" parameter while generating the request to the idp. If username field and user_id fields have different values in the SF side, this will fail in the SFAPI OAuth login operation later. Please change the username field to have same value as userID. This workaround can be used until 2H 2021 release, after that, we will be able to have different username and userIds due fix in the API code tracked under internal reference nro API-20638.


OAuth, SFAPI, failed, code = 14, Authentication failed, no API login permission(status code = 14), username, userid, user_id, API-20638, 2H 2021 release, b2111, 2111 , KBA , LOD-SF-INT-API , API & Adhoc API Framework , LOD-SF-INT-ODATA-OAU , ODATA OAUTH Authentication , How To


SAP SuccessFactors HXM Suite all versions