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

Set end date and startdate in AD's attribute

navneetv
Regular Contributor II
Regular Contributor II

Hi Team,

I am trying to update the start date while creating a user account and enddate and startdate when End date is populated in the user profile. 

Here is the creation account JSON 

{

{ "Description": "${user.STARTDATE}"

}

Update  account JSON

{
"Description": "${user.STARTDATE==null?' ':user.STARTDATE}",
"Organization": "${user.ENDDATE==null?' ':user.ENDDATE}"
}

 

While creating an account I am getting the below error also while updating the account attribute getting the same error 

Checking DN for CN=Nirmal Jack,OU=Headquarters,OU=Users,OU=abc,DC=rcoffice,DC=xyz,DC=com.Not FOund DN for CN=Nirmal Jack,OU=Headquarters,OU=Users,OU=abc,DC=rcoffice,DC=xyz,DC=com. Error while creating account in AD - No such property: STARTDATE for class: com.saviynt.ecm.identitywarehouse.domain.Users

could you please advise how I can update the start date and end date on AD account.?

This is what format we have in startdate and enddate . i took from data Analyzer

2023/06/06 00:00:00

7 REPLIES 7

smithamg
Regular Contributor
Regular Contributor

Hello @navneetv 

Try below format
${if(user?.startdate!=null){user.startdate}}

Thanks,
Smitha

navneetv
Regular Contributor II
Regular Contributor II

Hi Smithamg,

still getting the same error. I found one post, where they suggested using the below format. I will try if it works or not.

 "${if(user.enddate != null){10000*(user.enddate.getTime() + 11644473600000)} else {'0'}}"

rushikeshvartak
All-Star
All-Star

user.startDate


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

navneetv
Regular Contributor II
Regular Contributor II

Hi, @rushikeshvartak it is working with the below format and the date is being populated. However, how I can only use the date not the time.

"adminDescription": "Start Date ${user.startdate.format('MM-dd-yyyy hh:mm a',TimeZone.getTimeZone('Etc/UTC'))}",
"adminDisplayName": "End Date ${user.enddate.format('MM-dd-yyyy hh:mm a',TimeZone.getTimeZone('Etc/UTC'))}",

navneetv_0-1686632766947.png

 

navneetv
Regular Contributor II
Regular Contributor II

Hi Saviynt Team,

could you please help or advise what format should I use for the date only? It must not be included in time.

what we want to achieve 

ex: 04-25-2022 (MM-dd-yyyy) 

Hi @navneetv 

use the below format. Please let me know if this helps.

"adminDescription": "Start Date ${user.startdate.format('MM-dd-yyyy')}",

Regards,
Naveen Sakleshpur
If this reply answered your question, please click the Accept As Solution button to help future users who may have a similar problem.

navneetv
Regular Contributor II
Regular Contributor II

it got resolved by using this format. Now only the date is being populated 

"adminDescription": "Start Date ${user.startdate.format('MM-dd-yyyy',TimeZone.getTimeZone('Etc/UTC'))}",
"adminDisplayName": "End Date ${user.enddate.format('MM-dd-yyyy',TimeZone.getTimeZone('Etc/UTC'))}",