# Update LCS for identities using API

**URL:** <https://developer.sailpoint.com/discuss/t/update-lcs-for-identities-using-api/55682>\
**Category:** SHF Discussion and Questions\
**Tags:** sailpoint-identity-security, apis\
**Created:** [May 7, 2024, 7:08am UTC](https://developer.sailpoint.com/discuss/t/update-lcs-for-identities-using-api/55682 "2024-05-07T07:08:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![shaileeM](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/shaileem/32/15314_2.png) [@shaileeM](https://developer.sailpoint.com/discuss/u/shaileeM)\
**Post date:** [May 7, 2024, 7:08am UTC](https://developer.sailpoint.com/discuss/t/update-lcs-for-identities-using-api/55682/1 "2024-05-07T07:08:05Z")

</div>

Dear All,

Wanted check if there is some way to modify LCS of an identity via API?

Thanks,  
Shailee

---

<div class="post-metadata">

**Author:** ![baoussounda](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/baoussounda/32/13095_2.png) [@baoussounda](https://developer.sailpoint.com/discuss/u/baoussounda)\
**Post date:** [May 7, 2024, 8:01am UTC](https://developer.sailpoint.com/discuss/t/update-lcs-for-identities-using-api/55682/2 "2024-05-07T08:01:12Z")

</div>

Hi @shaileeM ,

You can set a lifecycle state with this api : [set-lifecycle-state | SailPoint Developer Community](https://developer.sailpoint.com/docs/api/v3/set-lifecycle-state)

---

<div class="post-metadata">

**Author:** ![vguleria](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/vguleria/32/7884_2.png) [@vguleria](https://developer.sailpoint.com/discuss/u/vguleria)\
**Post date:** [May 7, 2024, 8:20am UTC](https://developer.sailpoint.com/discuss/t/update-lcs-for-identities-using-api/55682/3 "2024-05-07T08:20:26Z")

</div>

Hi Shailee,

As @baoussounda mentioned, it is possible to update the lifecycle state of the identity using below endpoints

{{baseUrl}}/identities/:identity-id/set-lifecycle-state

where identity-id is the identity of the ISC identity. It will be POST method and you will need to pass the cloud lifecycle state id in the body like below

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

You can get the cloud lifecycle state id using the below API.

METHOD -GET

https://{{ORG\_NAME}}.api.identitynow.com/v3/identity-profiles/ **:IDENTITY\_PROFILE\_ID** /lifecycle-states

where identity profile id should be the id of the id profile which contains your cloud lifecycle state.

So in my experience when doing it via external scripts, i make first call to get all the identity profiles and then for each identity profile then make a call to get their life cycle state and check where the lifecycle state exists, and then only make the set lifecycle state API.

In case of issues, please let us know.

Regards  
Vikas.

---

<div class="post-metadata">

**Author:** ![baoussounda](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/baoussounda/32/13095_2.png) [@baoussounda](https://developer.sailpoint.com/discuss/u/baoussounda)\
**Post date:** [May 7, 2024, 11:22am UTC](https://developer.sailpoint.com/discuss/t/update-lcs-for-identities-using-api/55682/5 "2024-05-07T11:22:28Z")

</div>

@shaileeM in addtionnal and as remark, you must care about updating lifecylestate by api because in each identity refresh or identity process a lifecyclestate must be recalculted automatically for an effecient JML processes.

I will give you a complete example here :

1. Initial lifecycle state :

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

1. updating it via Postman with [set-lifecycle-state | SailPoint Developer Community](https://developer.sailpoint.com/docs/api/v3/set-lifecycle-state) endpoint :  
a. Retreving list of lifecycstate of an identity profile by using [list-lifecycle-states | SailPoint Developer Community](https://developer.sailpoint.com/docs/api/v3/list-lifecycle-states) endpoint :  

 ![image](https://global.discourse-cdn.com/sailpoint/original/2X/7/76e9cfe8b0c080a308078439f66156dc73a2a5e3.png)  
 ![image](https://global.discourse-cdn.com/sailpoint/original/2X/8/810207b831ae75fd1b01ac0adbc2369c9c3119ae.png)

In the body the id is the unique id of one of the lifecycle state retrieved in setp a. I use id of “inactive” lifecycle state.

1. Verify Identity :  
As you can remark below a lifecycle state is updated :  
 ![image](https://global.discourse-cdn.com/sailpoint/original/2X/3/377b64ae90746f236d0ea639f2e0c184dc9d3234.png)

---

<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 6, 2024, 11:23am UTC](https://developer.sailpoint.com/discuss/t/update-lcs-for-identities-using-api/55682/6 "2024-07-06T11:23:19Z")

</div>

Closed on July 6, 2024, 11:23am UTC

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
