SAP Knowledge Base Article - Public

2430160 - Odata Upsert error: "Cannot upsert an inactive user.. with the index 0"

Symptom

  • 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

Successfactors

Cause

Designed system behavior

Resolution

The 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-

https://apisalesdemo4.successfactors.com:443/odata/v2/upsert?processInactiveEmployees=true

This way the API will allow you to create Inactive users in the system.

See Also

2443073 - Unable to insert/upsert new inactive users in Bizx via SFAPI User Entity

Keywords

Inactive users, Upsert, Odata entity, Error: Cannot upsert an inactive user.. with the index 0, processInactiveEmployees, parameter , KBA , LOD-SF-INT-API , API & Adhoc API Framework , LOD-SF-INT , Integrations , LOD-SF-INT-ODATA , OData API Framework , Problem

Product

SAP SuccessFactors HCM Core 1702 ; SAP SuccessFactors HCM Suite all versions