SAP Knowledge Base Article - Public

2317289 - How to query the SF Odata Photo entity and retrieve the image - SuccessFactors Integration


This document explains:

  1. How to perform a query operation using the Odata API entity?
  2. What is the API response in this case?
  3. How to retrieve profile Photo from the API response without Provisioning job?


SAP SuccessFactors Employee Profile

Reproducing the Issue

Using API response to retrieve profile photo/image.


Alternative procedure to retrieve profile photo besides a Provisioning job to download the photos.


Using Photo entity

  1. Odata API request to fetch the user's photo.


    Understanding the Query url:

    Entity used - Photo (Odata)

    Filter - User id is filtered (where user id = admin)

    Select - Photo.

  2. Odata API response for the above call.

    Please refer to the attachment API response.txt

    The binary data for the photo is extracted and attached in the attachments section.

  3. How to retrieve the photo back to jpg?

You would require another tool to decode binary data to another format like jpg.

In this document, we have used a third party online tool to perform the decode.

binary to jpg.jpg

   You could use any relevant application/tool to generate the image.

See Also

The system stores several images for a single user's 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 photoType field. You can query for a specified photoType. All photos with the identified photoType for all active users are returned.
To retrieve photos for a given userId but different photoType, you need to specify the userId in the query.

To retrieve a single photo for a given userId and photoType, you need to put both of them into query criteria.


SuccessFactors; Photo Entity; Integration Center; Exporte Profile Photo; Exporte Profile Image; Exporte Profile Picture; Without SFTP Server; Without SFTP Job; How to Get Photo Using API; , KBA , LOD-SF-INT , Integrations , LOD-SF-INT-API , API & Adhoc API Framework , How To


SAP SuccessFactors HCM suite all versions


API response.txt