ISC Set LifeCycleState API Issue

Hi All,

An Emergency Termination workflow has been created with a Form Trigger. Upon form submission, an HTTP action is executed that updates the user’s Lifecycle State (LCS) to emergencyTermination.

The lifecycle state update is successful and is correctly reflected in the UI.

However, within the same workflow execution, a Define Variable step added immediately after the HTTP action, still returns the user’s lifecycle state as “active “instead of emergencyTermination.

Not sure on the above behaviour, ideally if it got updated o “emergencyTermination”, it should show the same in workflow when fetching through define variable as well.

Thanks,

Shireesha

Hi @Shireesha5

Can you provide your workflow to us with tenant/secret details omitted?

It sounds like you’ll need to pull the identity details again and set it to DefineVariable, but I’ll need to see the workflow to confirm.

Hello,

Welcome to SailPoint Developers Forum!

We have just implemented the Emergency Termination through Forms and Workflow.

Once you call the API which sets the identity LCS state to a new one, I would suggest you to put a “Wait“ action method in your workflow and wait time should be of 1 to 2 mins.

Then, I think your method which is checking whether LCS state of the user has changed to the “NewOne“ will work as expected and fetch the new LCS state.

Note that LCS state change through UI or API takes couple of seconds (20 - 30 seconds) to process. Hence, putting a WAIT TIME of 1 min before calling the API to check LCS state of the identity would resolve your issue.

Regards,

Rohit Wekhande.

Here is my workflow.

{
“name”: “Emergency Termination Workflow”,
“description”: “”,
“definition”: {
“start”: “Get List of Identities”,
“steps”: {
“Define Variable”: {
“actionId”: “sp:define-variable”,
“attributes”: {
“id”: “sp:define-variable”,
“variables”: [
{
“description”: “”,
“name”: “CLS”,
“transforms”: ,
“variableA.$”: “$.getIdentity.attributes.cloudLifecycleState”
}
]
},
“displayName”: “”,
“nextStep”: “End Step - Success”,
“type”: “Mutation”
},
“End Step - Success”: {
“actionId”: “sp:operator-success”,
“displayName”: “”,
“type”: “success”
},
“Get Identity”: {
“actionId”: “sp:get-identity”,
“attributes”: {
“id.$”: “$.getListOfIdentities.identities[0].id”
},
“displayName”: “”,
“nextStep”: “HTTP Request”,
“type”: “action”,
“versionNumber”: 2
},
“Get List of Identities”: {
“actionId”: “sp:get-identities”,
“attributes”: {
“inputQuery.$”: “$.trigger.formData.employeeId”,
“searchBy”: “searchQuery”
},
“displayName”: “”,
“nextStep”: “Get Identity”,
“type”: “action”,
“versionNumber”: 2
},
“HTTP Request”: {
“actionId”: “sp:http”,
“attributes”: {
“authenticationType”: “OAuth”,
“jsonRequestBody”: {
“lifecycleStateId”: “8cad5f49b8da479a8abedd57f1cc2541”
},
“method”: “post”,
“oAuthClientId”: “”,
“oAuthClientSecret”: ",
“oAuthCredentialLocation”: “oAuthInHeader”,
“oAuthTokenUrl”: “”,
“requestContentType”: “json”,
“requestHeaders”: null,
“url”: “https://xyz/v3/identities/{{$.getListOfIdentities.identities[0].id}}/set-lifecycle-state”
},
“displayName”: “”,
“nextStep”: “Wait”,
“type”: “action”,
“versionNumber”: 2
},
“Wait”: {
“actionId”: “sp:sleep”,
“attributes”: {
“duration”: “1m”,
“type”: “waitFor”
},
“displayName”: “”,
“nextStep”: “Define Variable”,
“type”: “action”,
“versionNumber”: 1
}
}
},
“creator”: {
“type”: “IDENTITY”,
“id”: “cc5e6436951649d7ad9a2366ef0c00f4”,
“name”: “700407”
},
“trigger”: {
“type”: “EVENT”,
“attributes”: {
“filter.$”: “$[?(@.formDefinitionId == ‘48bcf932-fbea-4231-a09c-293f9ae2e60f’)]”,
“formDefinitionId”: “48bcf932-fbea-4231-a09c-293f9ae2e60f”,
“id”: “sp:form-submitted”
}
}
}

Hi @rohit_wekhande I have kept the wait time of 1 minute, still no luck.

Ok!

Are you trying to Trigger the Immediate Termination for 1 User at a time through Form or Multiple Users?

I have used the latest API of v2024 –> https://<tenant_name>.api.identitynow.com/v2024/identities/{{$.getIdentity.id}}/set-lifecycle-state

Hence, could be an issue with v3 API as well.

Regards,

Rohit Wekhande.

Its difficult to follow the json you pasted and its may not be in the right sequence and i cannot import in my tenant due to dependencies but did you try to add a new step to get the Identity step after the LCS change ? it would be helpful if you can post screenshots.

I think as @lampard08 said, you may need to get the latest identity’s LCS by calling the get identity and it will work as you expect. Could you attach the Workflow json to have a look into it or a screenshot would do to understand the workflow on high level.

EmergencyTerminationWorkflow20260120.json (3.3 KB)

Try this workflow. it should work maybe with few changes according to your tenant.

Hi All,

The issue has been resolved by getting the identity details again through getIdentity step,

Thank you everyone!

1 Like