02/13/2023 08:30 AM
Hi Team,
I want to store today's date in the attribute"extensionAttribute3", but I'm getting the below error.
Please help me to know the correct format to store today's date.
CreateAccountJSON :
"extensionAttribute3": "${new Date().format("MM-dd-yyyy")}",
ERROR :
Error while creating account in AD - [LDAP: error code 80 - 00000523: SysErr: DSID-031A1242, problem 22 (Invalid argument), data 0 ]
02/13/2023 10:42 AM
extensionAttribute3 is a date field?
02/13/2023 03:16 PM
"extensionAttribute3": "#CONST#${new Date().format("MM-dd-yyyy")}",
02/14/2023 08:57 AM
Hi Team,
I tried both the suggested query, but still it is throwing the error
2023-02-14 16:29:39,536 [quartzScheduler_Worker-1] ERROR ldap.SaviyntGroovyLdapService - Error while creating account in AD - [LDAP: error code 80 - 00000523: SysErr: DSID-031A1242, problem 22 (Invalid argument), data 0
]
javax.naming.NamingException: [LDAP: error code 80 - 00000523: SysErr: DSID-031A1242, problem 22 (Invalid argument), data 0
]; remaining name 'CN=SVC-TH-T1-ADFourtyOne,OU=T1-Service Accounts,OU=T1,OU=Admin,OU=TH,DC=devglobal,DC=lotuss,DC=org'
at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:3198)
at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:3100)
at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2891)
at com.sun.jndi.ldap.LdapCtx.c_createSubcontext(LdapCtx.java:812)
at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_createSubcontext(ComponentDirContext.java:341)
at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.createSubcontext(PartialCompositeDirContext.java:268)
at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.createSubcontext(PartialCompositeDirContext.java:256)
at javax.naming.directory.InitialDirContext.createSubcontext(InitialDirContext.java:197)
at com.saviynt.ldap.SaviyntGroovyLdapService$_createAccountGLDAP_closure3.doCall(SaviyntGroovyLdapService.groovy:790)
at com.saviynt.ldap.SaviyntGroovyLdapService.createAccountGLDAP(SaviyntGroovyLdapService.groovy:259)
at com.saviynt.ecm.services.ArsTaskService.createAccountTarget(ArsTaskService.groovy:10491)
at com.saviynt.ecm.services.ArsTaskService$_completeAutoProvTasks_closure139.doCall(ArsTaskService.groovy:8969)
at com.saviynt.ecm.services.ArsTaskService.completeAutoProvTasks(ArsTaskService.groovy:8962)
at MultipleProvisioningJob$_execute_closure2.doCall(MultipleProvisioningJob.groovy:159)
at MultipleProvisioningJob.execute(MultipleProvisioningJob.groovy:127)
at org.quartz.core.JobRunShell.run(JobRunShell.java:199)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:546)
2023-02-14 16:29:39,537 [quartzScheduler_Worker-1] DEBUG println.PrintlnToLogger - Println :: [1;31m| Error [22;39mjavax.naming.NamingException: [LDAP: error code 80 - 00000523: SysErr: DSID-031A1242, problem 22 (Invalid argument), data 0
02/14/2023 09:12 AM
What is the datatype that extensionAttribute3 can store.
Also, can you check in the logs to see the payload information of the values being sent from Saviynt.
02/14/2023 09:31 AM - edited 02/14/2023 09:31 AM
As I pointed before I assume extensionAttribute3 is not a date field. So try converting it to string and see it that works like below
"extensionAttribute3": "${new SimpleDateFormat("MM-dd-yyyy").format(Calendar.getInstance().getTime())}"
02/13/2023 08:58 PM - edited 02/13/2023 08:58 PM
Can you try with the below
${Calendar.getInstance().getTime().format('yyyyMMddHHmmss')}Z