SAP Knowledge Base Article - Public

2736579 - How to Query Different Types of Users via "USER" entity in SuccessFactors OData

Symptom

You are querying Different Types of Users, and want's to know their state of activeness in the system.

Environment

SAP SuccessFactors HXM Suite

Resolution

In SAP SuccessFactors, status values are used to identify the different types of users and their state of activeness in the system. Below is a list of available statuses and their meanings:

Status Value

Status Text

Description

 t

active

Active users

f

inactive

Inactive users

T

active_external

Active external users for 360 Review

F

inactive_external

Inactive external users for 360 Review

e

active_external_suite

Active Learning and Onboarding users

d

inactive_external_suite

Inactive Learning and Onboarding users

A query without $filter or key predicate will only return active users in status t and T. To query other types of users, you have the following options:

  • You can query inactive internal and external users (status f, F, e, d) using the $filter keyword. For example:

          https://odata/v2/User?$filter=status in 'f','F','e','d'&$format=JSON

  • You can also query inactive internal and external users using the key predicate. For example:

          https://<hostname>/odata/v2/User('cgrant')?$format=JSON

  • When you expand from a base object to a user, the result will show users of all statuses. In the following example, all matrix managers of user cgrant will be returned regardless of their statuses

          https://<hostname>/odata/v2/User('cgrant')?$expand=matrixManager?$format=json

  • You can also query the matrix managers of a user like this:

          https://odata/v2/User('cgrant')/matrixManager?$format=json

NOTE: As of Q4 2018 Release, the Employee Export permission is no longer a prerequisite for querying inactive employees. When you apply $filter to queries that expand to other entities, the filter only works on the basic object. When a key predicate is present, the $filter parameter will be ignored. Do not use parameter $filter=status ne '<status>' to query users. Instead, explicitly list the type of user statuses you want to retrieve.

See Also

SAP SuccessFactors HXM Suite OData API: Reference Guide (V2) Querying Different Types of Users

Keywords

USER, Status, Inactive Employee, OData, User, user, type of user's, query users. , KBA , LOD-SF-INT-ODATA , OData API Framework , LOD-SF-INT , Integrations , How To

Product

SAP SuccessFactors HCM suite all versions