Click HERE to see how Saviynt Intelligence is transforming the industry. |
09/16/2024 10:53 PM
We want to populate the value from endDate dynamic attribute to the AD Account under accountexpires attribute.
Note: We are not mapping that attribute with user.enddate. Instead need to pass endDate in the create account JSON.
"accountExpires": "${endDate!=null?(10000*(endDate.getTime()+11644473600000)):'0' }",
It gives an error saying attribute conversion not possible.
It works fine when using using dynamic attribute usercolumn as enddate and passing user.enddate.
Please confirm the syntax when we cant use user.enddate.
09/16/2024 11:06 PM
@Shubhamjain27 what is the type for that dynamic attribute?
09/16/2024 11:07 PM
Date Type
09/16/2024 11:14 PM
@Shubhamjain27 , try this .. remove ! Null condition and just pass this
10000*(endDate.getTime()+11644473600000)
09/16/2024 11:21 PM
Still the same error. tried using new Date() as well but no luck.
09/17/2024 12:55 AM
ahh.. our dev is down can't test it..
can you share your DA config?
09/23/2024 01:28 PM
Hi @Shubhamjain27 , is the issue resolved?
09/23/2024 02:07 PM
"accountExpires": "${(new SimpleDateFormat('yyyy-MM-dd').parse(user.enddate).getTime() + 11644473600000L) * 10000L}"
If you what the dynamic attribute replace the user.enddate with it.
OR
This will set current time to accountExpires in AD.
"accountExpires": "${(Calendar.getInstance().getTimeInMillis() + 11644473600000L)* 10000L}"
09/23/2024 08:36 PM - edited 09/23/2024 08:39 PM
@Shubhamjain27 try below
"accountExpires": "${user.enddate!=null?(10000*(user.enddate.getTime()+11644473600000)):'0' }",
or
"accountExpires": "${user?.enddate!=null?(10000*(user?.enddate.getTime()+11644473600000)):'0' }",
or
"accountExpires": "${(user.enddate != null) ? (10000*(user.enddate.getTime() + 7776000000 + 11644473600000)) : '0'}"
or
"accountExpires": "${(Calendar.getInstance().getTimeInMillis() + 11644473600000L)* 10000L}"