Symptom
You want to fetch user's account information like the ones below using OData API:
- Employee's account status
- Default Locale
- Account creation date, etc.
Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.
Environment
- SAP SuccessFactors HXM Suite
- OData API
Resolution
SFSF OData API's 'UserAccount' entity can be used to fetch this data.
Permission needed to access this entity: Manage User > User Account OData entity
Sample Query:
https://apisalesdemo4.successfactors.com/odata/v2/UserAccount?$format=json
Sample Response:
{
"d": {
"results": [
{
"__metadata": {
"uri": "https://hostname /odata/v2/UserAccount('cclark')",
"type": "SFOData.UserAccount"
},
"username": "cclark",
"loginMethod": null,
"personIdExternal": "cclark1",
"accountStatus": "INACTIVE",
"locale": "en_US",
"lastInactivationDateTime": null,
"createdDateTime": "2000-12-31T16:00:00Z",
"lastLoginFailedDateTime": null,
"lastModifiedDateTime": "2014-10-13T13:45:00Z"
}
],
}
}
The property statusAccount is used as follows: In the database, it stores 0/1, 0 standards for ACTIVE; 1 standards for INACTIVE. In Odata API response, users will see ACTIVE or INACTIVE. In Odata API filter request, we support both ACTIVE/INACTIVE(case-ignored), and 0/1. Filter supports “eq” “ne” “in” operations.
Keywords
UserAccount, accountStatus, default_locale, Odata, API, LastInactivationDate, UserAccount OData entity permission is not enabled , KBA , LOD-SF-INT-ODATA , OData API Framework , LOD-SF-INT , Integrations , How To