Click HERE to see how Saviynt Intelligence is transforming the industry. |
05/17/2024 01:32 AM
Hi guys,
Need small help I am passing userAccountControl in create account Json with this condition
"userAccountControl": "${if (startdate == curdate()) { '512' } else { '514' }}"
whilte creating account it is given this error
Error while creating account in AD - [LDAP: error code 21 - 00000057: LdapErr: DSID-0C0911AD, comment: Error in attribute conversion operation, data 0, v3839]
without this the JSOn is working please let me know how I can achieve it we are creating account in disable state when the user is future dated and if startDate == curdate() then active state
05/17/2024 04:34 AM
@Rohit_Mishra can you try below please
"userAccountControl": "${if (user?.startdate.format('yyyy-MM-dd') == (Calendar.instance.format('yyyy-MM-dd'))) {
'512'
} else {
'514'
}}"
or
"userAccountControl": "${if (user?.startdate?.format('yyyy-MM-dd') == new Date().format('yyyy-MM-dd')) { '512' } else { '514' }}"
05/20/2024 10:20 PM
startdate.getTime() === curdate().getTime() ? '512' : '514'