How to keep the identities although the account is deleted from Source of Truth

How to keep the identities although the account is deleted from Source of Truth or from the authoritative source. We really want to keep the identity if the account has been deleted from the source itself.

Use PATCH v3/sources/{sourceId} with the following JSON request body to disable account deletion during source aggregation even if the account is no longer present in the external source system.

[
    {
        "op": "add",
        "path": "/connectorAttributes/checkDeletedDisabled",
        "value": "true"
    }
]
2 Likes

Thanks for this Christina,
But it returning 400


And also is the value should say “value”: “true” or “value”: true

It appears that you are using the shorter sourceId that is used by v1 and v2 API calls, but v3 and beta API calls require the longer sourceId GUID. You can retrieve your sourceId GUIDs by using GET v3/sources. The sourceId GUID is found in the “id” attribute towards the bottom of the source definition.

I tested this API call with “value”: “true” or “value”: true in the JSON body, and both worked.

Hey Christina,


I have tried with the guid id that you have mentioned but still I am getting a bad request. I tried in both the tenement but still same. Are you sure this patch API works ?? Or am I doing something wrong here?
Other API calls works fine.

I am having trouble replicating your error. Often times, a “400 Bad Request” error means something is wrong with the JSON request body. Could there be a hidden character somewhere?

I believe it would be a different error, but can you verify that Content-Type set to “application/json-patch+json” in the request headers?

The fact that you’re getting an HTML error response back instead of a JSON error response is certainly an indicator of something about your request being malformed. What is the full URL you are sending the request to?

Thanks it worked for my other teammate.

Can you export your request as a cURL command and post it here? Please make sure you delete your access token from the command before sharing it.

See the images below for the steps to get the cURL command.

Here it is:
Now the error is different

Let me the know the working curl request please, I would like to try

Make sure you set the appropriate Content-Type header. For example:

curl --location --request PATCH 'https://devrel.api.identitynow.com/v3/sources/2c9180857be05639017be4c71b414094' \
--header 'Content-Type: application/json-patch+json' \
--header 'Authorization: ' \
--data-raw '[
    {
        "op": "replace",
        "path": "/description",
        "value": "testing triggers"
    }
]'