Symptom
"Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental."
- Trying to upsert a new User record via OData API.
- Entity name is: 'SFOData.User'
- The status passed in the request for the field status is: 'f'/'inactive'.
- It throws error message: "Cannot upsert an inactive user.. with the index 0" as follows.
<entry>
<content type="application/xml">
<m:properties>
<d:key m:null="true"></d:key>
<d:status>ERROR</d:status>
<d:editStatus m:null="true"></d:editStatus>
<d:message>Cannot upsert an inactive user.. with the index 0</d:message>
<d:index m:type="Edm.Int32">0</d:index>
<d:httpCode m:type="Edm.Int32">500</d:httpCode>
<d:inlineResults m:type="Bag(SFOData.UpsertResult)"></d:inlineResults>
</m:properties>
</content>
</entry>
Environment
SAP SuccessFactors HXM Suite
-OData Entities
Cause
Designed system behavior
Resolution
The SFOData.User entity does not allow creation of users as 'inactive' directly.
However, if you have a Business scenario wherein you need to upsert inactive users, you can use the parameter 'processInactiveEmployees' in your Upsert request as follows:
GET https://<api-server>/odata/v2/upsert?processInactiveEmployees=true
This way the API will allow you to create Inactive users in the system.
processInactiveEmployees is an exclusive parameter for the User entity. You can use this parameter when edit an inactive user.
See Also
Keywords
Inactive users, upsert, OData entity, error, processInactiveEmployees, parameter, user creation error, API error, status field, inactive status, system behavior, error index 0, user entity, OData API, true, false , KBA , ss_anonymizedkba , LOD-SF-INT-ODATA , OData API Framework , LOD-SF-INT , Integrations , Problem
SAP Knowledge Base Article - Public