SAP Knowledge Base Article - Public

3414315 - Photo Odata API known issue: PhotoType 20 are randomly stored under one user when there are multiple employments

Symptom

Employee has primary user and concurrent users: PhotoType 20 are randomly stored under one user when there are multiple employments 

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

Environment

SAP SuccessFactors HXM Core

  • Employee Central Photo entity

Reproducing the Issue

1. Confirm this user has concurrent users:

Post: https://apisalesdemo8.successfactors.com/odata/v2/EmpEmployment?$format=json&$filter=personIdExternal eq 'akuwa'&&$select=userId

Response:

{
    "d": {
        "results": [
            {
                "__metadata": {
                    "uri": "https://apisalesdemo8.successfactors.com/odata/v2/EmpEmployment(personIdExternal='akuwa',userId='akuwa')",
                    "type": "SFOData.EmpEmployment"
                },
                "userId": "akuwa" -- Primary User
            },
            {
                "__metadata": {
                    "uri": "https://apisalesdemo8.successfactors.com/odata/v2/EmpEmployment(personIdExternal='akuwa',userId='103211')",
                    "type": "SFOData.EmpEmployment"
                },
                "userId": "103211"  -- Concurrent user
            }
        ]
    }
}

2. Upsert Photo with pohtoType 1 to primary user.

Post: https://apisalesdemo8.successfactors.com/odata/v2/upsert?$format=json

Payload: 
{
    "__metadata": {
        "uri": "Photo(photoType=1,userId='akuwa')",
        "type": "SFOData.Photo"
    },
    "photoType": 1,
    "userId": "akuwa",
    "photo": "/9j/4AAQSkZJR

...

Response:

{
    "d": [
        {
            "key": "Photo/photoType=1,Photo/userId=akuwa",
            "status": "OK",
            "editStatus": "UPDATED",
            "message": "updated successfully",
            "index": 0,
            "httpCode": 204,
            "inlineResults": null
        }
    ]
}

3. Get the concurrent userId, we can get the phototype 20 record.

https://apisalesdemo8.successfactors.com/odata/v2/Photo?$format=json&$filter=userId eq '103211' and photoType eq '20'

Response:

d": {
        "results": [
            {
                "__metadata": {
                    "uri": "https://apisalesdemo8.successfactors.com/odata/v2/Photo(photoType=20,userId='103211')",
                    "type": "SFOData.Photo"
                },
                "photoType": 20,
                "userId": "103211",
                "lastModifiedDateTime": "/Date(1702953433000+0000)/",
                "photo": "/9j/4AAQSkZJRgABAQAAAQABAAD/4SwTRXhpZgAATU0AKgAAAAgABQEaAAUAAAABAAAASgEbAAUA\r\nAAABAAAAUgEoAAMAAAABAAIAAAITAAMAAAABAAEAAIdpAAQAAAABAAAAWgAAALQAAABIAAAAAQAA\r\nAEgAAAABAAeQAA

...

4. Get the primary userId, we cannot get the phototype 20 record.

https://apisalesdemo8.successfactors.com/odata/v2/Photo?$format=json&$filter=userId eq ' akuwa' and photoType eq '20'

Response:

{
    "d": {
        "results": []
    }
}

Actual Results:

photoType20 record is under concurrent user.

Expect Results:

photoType20 record is under primary user.

Resolution

This error occurs only when there are multiple users, and unfortunately, there is currently no viable workaround available.

In order to deliver a better customer experience, this is issue currently being worked on by our Development team and it's planned to be fixed in the release 2405.

Keywords

EDU-19601, Photo, concurrent User, primary user, photoType 20, photoType 1 , KBA , LOD-SF-INT-ODATA , OData API Framework , Known Error

Product

SAP SuccessFactors HXM Core 2311