How to modify source in Access profile by API

Hello All,

Can we modify source of an access profile by API?

I tried to modify Source of Access profile via ISC API v2026

With Access profile PATCH API, patch-access-profile | SailPoint Developer Community

I am able to modify entitlements of same source which is existing on Access profile. Also able to change other fields like description, requestable, etc.

As per this document, If you need to change the source of the access profile, you can do so only if you update the entitlements in the same API call. The new entitlements can only come from the target source that you want to change to.

But, when I tried to change Source along with entitlements, it is failing.

JSON payload in Request →

[

    {

        "op": "replace",

        "path": "/source",

        "value": {

            "type": "SOURCE",

            "id": "4a3cd4a0ace54f1f8177a6a33452bd6c",

            "name": "ISC Groups"

        }

    },

    {

        "op": "replace",

        "path": "/entitlements",

        "value": {

            "type": "ENTITLEMENT",

            "id": "56b1701fd05437b78b0a9d6455f59618",

            "name": "Access Intelligence Center - Admin" 

        }

    }

]


Response body →

{

    "messages": [

        {

            "localeOrigin": "DEFAULT",

            "locale": "en-US",

            "text": "The request was syntactically correct but its content is semantically invalid."

        },

        {

            "localeOrigin": "REQUEST",

            "locale": "en-US",

            "text": "The request was syntactically correct but its content is semantically invalid."

        }

    ],

    "detailCode": "400.1 Bad request content",

    "trackingId": "cdf2d2c26c9444e38ebd99d3d74d545a"

}


Please let me know how this can be fixed or any workaround is possible.

Note: I verified that “id” and other variables used in request body are correct.

Hi @mandarsane
I see there is some issue with syntax for the entitlements that you are passing in your JSON payload. The entitlement should be a list. I was able to replace source and entitlement on my Access Profile using the patch API by passing the following JSON payload.
Here I replaced Entitlement consisting of AD group from my Active Directory Source with another source called Cosmos and Entitlement GroupC which exists on the Cosmos source

[
  {
    "op": "replace",
    "path": "/source",
    "value":
        {
            "id": "04f01d57798c4cc788e9972f7713c488",
            "type": "SOURCE",
            "name": "Cosmos"
        }
  },
    {
    "op": "replace",
    "path": "/entitlements",
    "value": [
        {
            "id": "2556783572e23ff0b60477d967b97d68",
            "type": "ENTITLEMENT",
            "name": "GroupC"
        }
    ]
  }
]

Thank you @SanjeevIAM

after converting entitlements to List, it is working now for me.