Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

Error while creating account in AD - [LDAP: error code 21 - 00000057: LdapErr: DSID-0C0911AD, commen

Rohit_Mishra
New Contributor III
New Contributor III

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

2 REPLIES 2

Raghu
Valued Contributor III
Valued Contributor III

@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' }}"


Thanks,
Raghu
If this reply answered your question, Please Accept As Solution and hit Kudos.

rushikeshvartak
All-Star
All-Star

startdate.getTime() === curdate().getTime() ? '512' : '514'


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.