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

How to Populate Current Date using ateUserJson using sav4sav

Chirag_Gupta
New Contributor III
New Contributor III

Hello Everyone,

I am currently using the following configuration to update a user's login in our Saviynt environment:

{
"actions": {
"Update Login": {
"call": [
{
"name": "Update Login",
"connection": "userAuth",
"url": "https://####-dev.saviyntcloud.com/ECM/api/v5/updateUser",
"httpMethod": "POST",
"httpContentType": "application/json",
"httpParams": "{\"username\": \"${user?.username}\", \"customproperty22\": \"IMMEDIATE_TERM\", \"propertytosearch\": \"username\"}",
"httpHeaders": {
"Authorization": \"${access_token}\",
"Content-Type": \"application/json\"
},
"successResponses": {
"message": \"User Updated Successfully\",
"statusCode": [
200,
201
]
}
}
]
}
}
}

Currently, I am passing `"IMMEDIATE_TERM"` in `customproperty22`. However, I would like to replace this with the current date at runtime instead of the fixed string `"IMMEDIATE_TERM"`.

Could you please guide me on how to modify the JSON configuration to pass the current date in the required format?

Thank you!

Chirag Gupta

[This post has been edited by a Moderator to remove sensitive information.]

1 REPLY 1

rushikeshvartak
All-Star
All-Star

${(new Date()).format('yyyy-MM-dd')}

Refer https://forums.saviynt.com/t5/general-discussions/rest-connector-current-date/m-p/2088#M226 


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