How to Integrate SuccessFactors Employee Profile photos with 3rd party system

There are organizations who has a central photo repository which manages employee profile photos and then integrates with all other applications/system who need photos. So if there is a requirement to send the photos to a target system, the OData API “photo”, can be used to retrieve the photos.

Before Jumping directly into the technical details of API, let me first explain few basic details around how photos are stored( formats, size etc.) in Successfactors.

How photos are stored

As soon as employee uploads a photo in employee profile, the system stores several images for the profile picture in different sizes to be used in different applications. For example, thumbnail size images are used in the org chart, quick card and faces page, while larger size images are used in the employee profile. The different photo types are categorized by the field “photoType” and exposed by API (in Binary format).

please see below the dimension for each photo and where it used within Successfactors.

How to extract photo using API

Call the “Photo” OData API, for demo purpose I’m using the s/w postman to query data.

This query will fetch all the 8 different dimension photos.

P.S – In the below output JSON code, i’ve shown only 3 types. Also note, I’ve mentioned “BINARY CODE” for the field “photo” which will contain the actual base64 encoded binary code of the photo.

Generally it’s just the “original” photo which is required, so an additional filter on photoType can be added to extract the required type.

Extracting the photos in delta/incremental mode is the recommended approach. Getting the data in Full mode is not at all suggested because of the photo size.

As of date, the API has a limitation, it cannot identify a deleted photo. When a photo is deleted the query returns PhotoType = 26, 27, 33, however the “last_modified_date” field is not updated and hence it is now possible to identify the “deleted” photos. ( I’ve raised an ER – hopefully SAP will fix it soon)