We had the same problem for concurrent employments and we have managed to find a solution to get the information from the main employment, details below:
1- Use personIdExternal as Key for User provisioning integration, this will provide to AD the payload including all (two or more) employment records linked to that person.
2- You can find out whether an employment is main or secondary using field isPrimaryAssignment from the User entity. To get to this field, considering the standard integration uses PerPerson entity to start the query, you need to navigate PerPerson/employmentNav/userNav/isPrimaryAssignment.
3- In AD user Provisioning integration, where source fields are configured, for SuccessFactors Employment related fields to be mapped to AD, you need to add the following JSONPath to get the right information for Department, for example:
$.employmentNav..results[?(@.userNav.isPrimaryAssignment == true)]..jobInfoNav..results[?(@.emplStatusNav.externalCode == 'A' || @.emplStatusNav.externalCode == 'U' || @.emplStatusNav.externalCode == 'P')].departmentNav.externalCode
With this expression, you will receive the external code of the department assigned in the main active employment.
I hope this helps.