and more in a single search tool across platforms. Read the announcement here. |
01/24/2024 11:27 PM
Hi Team,
We have configured create account json for active directory. We are getting attribute conversion error for account expires attribute. The json for account expires is mentioned below
{
"accountExpires":"${if(user.customproperty15=='Permanent Full-time' && user.enddate==null) {'Never'} else {user.endadate}}"
}
Please suggest.
01/25/2024 06:03 AM - edited 01/25/2024 01:33 PM
It should be date and not string instead of Never.
sample
{ ${if (task?.accountKey.customproperty10 == '') '"givenname" : "'+user?.firstname+'", "flags": "' + (user.employeeType=='Industrial'? '2' : (user.employeeType=='Commercial'? '1' : '')) + '",' else '"accountExpires": "' + (user?.getEnddate()?.toInstant()?.toEpochMilli() - (-11644494808000 * 10000)) + '", "sn" : "'+user?.lastname+'",' } }
Use below
{ "accountExpires":"${if((user?.customproperty15=='Permanent Full-time') && (user.enddate==null)) {'0'} else {10000*(user.enddate.getTime() + 11644473600000)}}" }
01/25/2024 09:23 AM
Hi @Prajna
Try with this
{
"accountExpires":"${if((user?.customproperty15=='Permanent Full-time') && (user.enddate==null)) {'0'} else {10000*(user.enddate.getTime() + 11644473600000)}}"
}