SAP Knowledge Base Article - Public

2607936 - API Query on User is not returning data - OData API

Symptom

You are executing an API query like the one below and it returns no data in response even though the employee exists in the SF system.

https://api.successfactors.com/odata/v2/User('1234')

Environment

  • SAP SuccessFactors HXM Suite
    • OData API

Reproducing the Issue

  1. Use any api tool to build a query for an specific user
  2. Run the query and observe that it did not returned any user

Cause

There are two main causes for this behavior:

  1. The user you are querying is an inactive user.
  2. The API user does not have permission in the target population for the target user of the query.

Resolution

In order to solve the causes above, you'll have to consider the following:

  1. Querying inactive users: by default the user entity only returns active users, so if this is an inactive user, you need to explicitly request this. Refer to the KBA 2166571.
  2. The API user does not have permission to the targeted user: to understand this behavior, please refer to Employee Import and Export Permissions and the KBA 2991051.

See Also

2166571 - How to query inactive users on User entity - OData API

Employee Import and Export Permissions

Keywords

inactive user, user entity, no data in response, api query, not able to query user, user not returned in odata api query, permission, target population , KBA , LOD-SF-INT-ODATA , OData API Framework , LOD-SF-INT , Integrations , Problem

Product

SAP SuccessFactors HCM Core 1711