SAP Knowledge Base Article - Public

2822120 - INVALID_MANAGER_ID : Failed to add/update user [xxxx] "" (N/A;N/A;N/A): Invalid Manager Id - "yyyy" – SuccessFactors OData API

Symptom

You are trying to update an user information, where this user's manager is inactive. Then, you are facing an error similar as below: 

INVALID_MANAGER_ID : Failed to add/update user [XXXXXXX] "" (N/A;N/A;N/A): Invalid Manager Id - "XXXXXXX". with the index 0

"Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental."

Environment

  • SuccessFactors HXM Suite

Cause

  The value of the field "managerExternalId" is incorrect in the request payload

Resolution

  • Please check if the userId send in the field value "managerExternalId" is valid user in the SuccessFactors instance
    • How can this be verified?
      • Trigger a query for User with the "managerExternalId" value supplied to externalId field (select externalId,username from User where externalId='yyyy')
      • If this returns <numResults>0</numResults>, it means this user(the manager id sent in the upsert payload) is not existing in the system
  • Please create the user in the system and then resend the upsert

Workaround: It's possible that you won't be able to proceed if the manager is inactive. In such case, a workaround would be to bypass the manager check from the API. For that, first you create an API option profile, and uncheck "Validate Manager" box.

Then, if using IC -> Configure fields - detail view, add that API option profile ID, then you can try again.

Now, If using ODATA call directly via API, it is easier: just add that option profile ID in the request URL &apiOptionProfileID=XXXXX.

For example, https://<API endpoint URL>/odata/v2/upsert?$format=json&apiOptionProfileID=XXXXXX_OptionProfile&purgeType=record

Keywords

RH_SFI_SYNCHRONIZE_EMPL_DATA, user not found , manager not found, INVALID_MANAGER_ID : Failed to add/update user [xxxx] "" (N/A;N/A;N/A): Invalid Manager Id - "yyyy", SFAPI, User entity, SOAP, INVALID_MANAGER_ID, (N/A;N/A;N/A), Invalid Manager Id with the index 0. , KBA , LOD-SF-INT-ODATA , OData API Framework , LOD-SF-INT-API , API & Adhoc API Framework , How To

Product

SAP SuccessFactors HCM suite all versions ; integration add-on for SAP ERP HCM and SAP SuccessFactors HCM all versions