Translate API call to API expression (JSON path?) in Entra ID SCIM Provisioning

Jakob Hus Digranes 20 Reputation points
2024-06-20T05:07:23.67+00:00

translate API call to API Expression. We sync from SAP Successfactors, all good - but we need to add an extra attribute not part of the standard setup. We use SCIM with Successfactors to Entra ID provisioning.

We have country code for phone number in a field called ExternalCode. Here's the API CALL:

/odata/v2/PerPhone?$select=countryCodeNav/externalCode,isPrimary,personIdExternal,phoneNumber,phoneType,phoneTypeNav/externalCode&$expand=countryCodeNav,phoneTypeNav

Need to translate this to an API expression to add attribute here:

Screenshot 2024-06-20 at 07.05.48

Here's the API expression for ZIP code (as an example):
$.employmentNav..results[?(@.jobInfoNav..results[?(@.emplStatusNav.externalCode == 'A' || @.emplStatusNav.externalCode == 'U' || @.emplStatusNav.externalCode == 'P')])].userNav.zipCode

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
1,908 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Jakob Hus Digranes 20 Reputation points
    2024-06-24T08:15:52.5866667+00:00

    I was able to retrieve the JSON from Postman;

    {

        "d": {

            "results": [

                {

                    "__metadata": {

                        "uri": "https://api55preview.sapsf.eu/odata/v2/EmpEmployment(personIdExternal='100XXXXX',userId='10XXXXX)",

                        "type": "SFOData.EmpEmployment"

                    },

                    "personIdExternal": "10XXXXX,

                    "userId": "10XXXXX",

                    "personNav": {

                        "__metadata": {

                            "uri": "https://api55preview.sapsf.eu/odata/v2/PerPerson('10XXXXX')",

                            "type": "SFOData.PerPerson"

                        },

                        "phoneNav": {

                            "results": [

                                {

                                    "__metadata": {

                                        "uri": "https://api55preview.sapsf.eu/odata/v2/PerPhone(personIdExternal='10XXXXX',phoneType='9340')",

                                        "type": "SFOData.PerPhone"

                                    },

                                    "phoneNumber": "50000000",

                                    "isPrimary": false,

                                    "countryCodeNav": {

                                        "__metadata": {

                                            "uri": "https://api55preview.sapsf.eu/odata/v2/PicklistOption(9162L)",

                                            "type": "SFOData.PicklistOption"

                                        },

                                        "externalCode": "+47"

                                    },

                                    "phoneTypeNav": {

                                        "__metadata": {

                                            "uri": "https://api55preview.sapsf.eu/odata/v2/PicklistOption(9340L)",

                                            "type": "SFOData.PicklistOption"

                                        },

                                        "externalCode": "H"

                                    }

                                },

                                {

                                    "__metadata": {

                                        "uri": "https://api55preview.sapsf.eu/odata/v2/PerPhone(personIdExternal='10XXXXXX',phoneType='9339')",

                                        "type": "SFOData.PerPhone"

                                    },

                                    "phoneNumber": "20000000",

                                    "isPrimary": true,

                                    "countryCodeNav": {

                                        "__metadata": {

                                            "uri": "https://api55preview.sapsf.eu/odata/v2/PicklistOption(9162L)",

                                            "type": "SFOData.PicklistOption"

                                        },

                                        "externalCode": "+47"

                                    },

                                    "phoneTypeNav": {

                                        "__metadata": {

                                            "uri": "https://api55preview.sapsf.eu/odata/v2/PicklistOption(9339L)",

                                            "type": "SFOData.PicklistOption"

                                        },

                                        "externalCode": "B"

                                    }

                                }

                            ]

                        }

                    }

                }

            ]

        }

    }

    0 comments No comments

  2. Jakob Hus Digranes 20 Reputation points
    2024-06-25T12:24:11.0966667+00:00

    We have worked us towards that this would be a working JSON expression;

    $.phoneNav.results[?(@.isPrimary == true)].countryCodeNav.externalCode

    However - no data is transferred. Might be restrictions in SAP Successfactors?

    0 comments No comments

  3. Jakob Hus Digranes 20 Reputation points
    2024-06-26T05:15:01.7233333+00:00

    Turns out that specific attribute isn't available to Successfactors Entra ID:
    Only these attributes can be navigated to from Successfactors Entra ID:
    https://video2.skills-academy.com/en-us/entra/identity/app-provisioning/sap-successfactors-integration-reference#supported-entities

    So looks like the JSON expression is good, but limitations in the integration stopped this from working

    0 comments No comments