Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

remove Account JSON REST connector

Rajatlm10
New Contributor III
New Contributor III

we need to add the terminationDate in removeAccoount JSON to for removing the account. 

the JSON is getting called and i have hardcoded the value. 

Rajatlm10_0-1718804207130.png

but the tasks are not getting completed. 

issue is in logs i m getting 200 as response for API call. 

I am not able to find any specific error. 

Has anyone faced such issue before ? i am the logs for reference please search with terminationDate in logs sheet. 

 

3 REPLIES 3

rushikeshvartak
All-Star
All-Star

Can you share json and date needs to be passed as today or from property 


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Rajatlm10
New Contributor III
New Contributor III

{
"call": [
{

"connection": "acctAuth",
"url": "https://xyz/v4/Users/${account.customproperty5}",
"httpMethod": "PATCH",
"httpParams": "{\"schemas\":[\"urn:ietf:params:scim:api:messages:2.0:PatchOp\"],\"Operations\":[{\"op\": \"add\",\"path\":\"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User\",\"value\":{\"terminationDate\":\"2029-12-11T19:28:00Z\",\"companyId\":\"abc\"}}]}",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
200
]
},
"unsuccessResponses": {
"statusCode": [
400,
401,
404,
500,
501,
502,
503,
504
]
}
}
]
}

 

We need date in 2029-12-11T19:28:00Z format, like todays date +1 in this format. with calendar instance method. 

\"${Calendar.getInstance().getTime().format(\"yyyy-MM-dd'T'HH:mm:ss'Z'\")}\"

is it possible to get tomorrow's date with calender.getinstance() method used above.

{
"call": [
{
"connection": "acctAuth",
"url": "https://xyz/v4/Users/${account.customproperty5}",
"httpMethod": "PATCH",
"httpParams": "{\"schemas\":[\"urn:ietf:params:scim:api:messages:2.0:PatchOp\"],\"Operations\":[{\"op\": \"add\",\"path\":\"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User\",\"value\":{\"terminationDate\":\"${new java.text.SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss'Z'\").format(java.util.Calendar.getInstance(java.util.TimeZone.getTimeZone('UTC')).apply { it.add(java.util.Calendar.DAY_OF_MONTH, 1) }.getTime())}\",\"companyId\":\"abc\"}}]}",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
200
]
},
"unsuccessResponses": {
"statusCode": [
400,
401,
404,
500,
501,
502,
503,
504
]
}
}
]
}


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.