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

**URL:** <https://developer.sailpoint.com/discuss/t/how-to-keep-the-identities-although-the-account-is-deleted-from-source-of-truth/5251>\
**Category:** SHF Discussion and Questions\
**Created:** [August 3, 2022, 3:25pm UTC](https://developer.sailpoint.com/discuss/t/how-to-keep-the-identities-although-the-account-is-deleted-from-source-of-truth/5251 "2022-08-03T15:25:54Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![smandal](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/smandal/32/39033_2.png) [@smandal](https://developer.sailpoint.com/discuss/u/smandal)\
**Post date:** [August 3, 2022, 3:25pm UTC](https://developer.sailpoint.com/discuss/t/how-to-keep-the-identities-although-the-account-is-deleted-from-source-of-truth/5251/1 "2022-08-03T15:25:55Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![christina\_gagnon](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/christina_gagnon/32/9929_2.png) [@christina\_gagnon](https://developer.sailpoint.com/discuss/u/christina_gagnon)\
**Post date:** [August 3, 2022, 4:15pm UTC](https://developer.sailpoint.com/discuss/t/how-to-keep-the-identities-although-the-account-is-deleted-from-source-of-truth/5251/2 "2022-08-03T16:15:11Z")

</div>

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.

```auto
[
    {
        "op": "add",
        "path": "/connectorAttributes/checkDeletedDisabled",
        "value": "true"
    }
]

```

---

<div class="post-metadata">

**Author:** ![smandal](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/smandal/32/39033_2.png) [@smandal](https://developer.sailpoint.com/discuss/u/smandal)\
**Post date:** [August 3, 2022, 4:54pm UTC](https://developer.sailpoint.com/discuss/t/how-to-keep-the-identities-although-the-account-is-deleted-from-source-of-truth/5251/3 "2022-08-03T16:54:25Z")

</div>

Thanks for this Christina,  
But it returning 400

 ![image](https://global.discourse-cdn.com/sailpoint/original/2X/4/4d4b5ff3424b5b4c122305929e0b331219cc7ec0.png)  
And also is the value should say “value”: “true” or “value”: true

---

<div class="post-metadata">

**Author:** ![christina\_gagnon](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/christina_gagnon/32/9929_2.png) [@christina\_gagnon](https://developer.sailpoint.com/discuss/u/christina_gagnon)\
**Post date:** [August 3, 2022, 5:45pm UTC](https://developer.sailpoint.com/discuss/t/how-to-keep-the-identities-although-the-account-is-deleted-from-source-of-truth/5251/4 "2022-08-03T17:45:40Z")

</div>

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.

 ![sourceId GUID](https://global.discourse-cdn.com/sailpoint/original/2X/2/2adb2fa631f30676442764fb4cd72ee5de1d96c4.png)

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

---

<div class="post-metadata">

**Author:** ![smandal](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/smandal/32/39033_2.png) [@smandal](https://developer.sailpoint.com/discuss/u/smandal)\
**Post date:** [August 4, 2022, 9:43am UTC](https://developer.sailpoint.com/discuss/t/how-to-keep-the-identities-although-the-account-is-deleted-from-source-of-truth/5251/5 "2022-08-04T09:43:54Z")

</div>

Hey Christina,

 ![image](https://global.discourse-cdn.com/sailpoint/original/2X/6/628dc5a06b8d289743c6509d0bcb0128327a0c41.png)  
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.

---

<div class="post-metadata">

**Author:** ![christina\_gagnon](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/christina_gagnon/32/9929_2.png) [@christina\_gagnon](https://developer.sailpoint.com/discuss/u/christina_gagnon)\
**Post date:** [August 4, 2022, 6:13pm UTC](https://developer.sailpoint.com/discuss/t/how-to-keep-the-identities-although-the-account-is-deleted-from-source-of-truth/5251/6 "2022-08-04T18:13:41Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![colin\_mckibben](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/colin_mckibben/32/37182_2.png) [@colin\_mckibben](https://developer.sailpoint.com/discuss/u/colin_mckibben)\
**Post date:** [August 4, 2022, 6:38pm UTC](https://developer.sailpoint.com/discuss/t/how-to-keep-the-identities-although-the-account-is-deleted-from-source-of-truth/5251/7 "2022-08-04T18:38:44Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![smandal](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/smandal/32/39033_2.png) [@smandal](https://developer.sailpoint.com/discuss/u/smandal)\
**Post date:** [August 8, 2022, 1:01pm UTC](https://developer.sailpoint.com/discuss/t/how-to-keep-the-identities-although-the-account-is-deleted-from-source-of-truth/5251/8 "2022-08-08T13:01:46Z")

</div>

Thanks it worked for my other teammate.

---

<div class="post-metadata">

**Author:** ![colin\_mckibben](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/colin_mckibben/32/37182_2.png) [@colin\_mckibben](https://developer.sailpoint.com/discuss/u/colin_mckibben)\
**Post date:** [August 8, 2022, 5:00pm UTC](https://developer.sailpoint.com/discuss/t/how-to-keep-the-identities-although-the-account-is-deleted-from-source-of-truth/5251/9 "2022-08-08T17:00:58Z")

</div>

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.

 ![image](https://global.discourse-cdn.com/sailpoint/original/2X/7/744c645d828508dcba6d628ae418201c76f69215.png)

 ![image](https://global.discourse-cdn.com/sailpoint/original/2X/8/8d3164b9c7fc898eb61a62c935980ca54b4333e1.png)

---

<div class="post-metadata">

**Author:** ![smandal](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/smandal/32/39033_2.png) [@smandal](https://developer.sailpoint.com/discuss/u/smandal)\
**Post date:** [August 8, 2022, 8:04pm UTC](https://developer.sailpoint.com/discuss/t/how-to-keep-the-identities-although-the-account-is-deleted-from-source-of-truth/5251/10 "2022-08-08T20:04:29Z")

</div>

Here it is:  
Now the error is different

 ![image](https://global.discourse-cdn.com/sailpoint/original/2X/2/2b59a24d18f25071f14aea36078819ae43088033.png)

---

<div class="post-metadata">

**Author:** ![smandal](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/smandal/32/39033_2.png) [@smandal](https://developer.sailpoint.com/discuss/u/smandal)\
**Post date:** [August 8, 2022, 8:10pm UTC](https://developer.sailpoint.com/discuss/t/how-to-keep-the-identities-although-the-account-is-deleted-from-source-of-truth/5251/11 "2022-08-08T20:10:17Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![colin\_mckibben](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/colin_mckibben/32/37182_2.png) [@colin\_mckibben](https://developer.sailpoint.com/discuss/u/colin_mckibben)\
**Post date:** [August 8, 2022, 8:48pm UTC](https://developer.sailpoint.com/discuss/t/how-to-keep-the-identities-although-the-account-is-deleted-from-source-of-truth/5251/12 "2022-08-08T20:48:02Z")

</div>

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

```json
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"
    }
]'

```

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/sailpoint/original/2X/f/f2136700ed5e3703e0b85e02f6be799dacca7735.png) [@system](https://developer.sailpoint.com/discuss/u/system)\
**Post date:** [July 19, 2023, 2:23pm UTC](https://developer.sailpoint.com/discuss/t/how-to-keep-the-identities-although-the-account-is-deleted-from-source-of-truth/5251/13 "2023-07-19T14:23:23Z")

</div>

Closed on July 19, 2023, 2:23pm UTC


