Please share any images or screenshots, if relevant.
Share all details related to your problem, including any error messages you may have received.
Hello Team,
I added the lastLogonTimestamp AD Attribute in IIQ. But it displays like a long integer (I have attached the screenshot). How can I convert this long inter into a proper Date Format?
Any suggestion will be helpful.
public static Date convertADTimestamp(long timestamp) {
long epochStart = -11644473600000L; // Difference in milliseconds between 1601 and 1970
return new Date(epochStart + (timestamp / 10000));
}
public static void main(String[] args) {
long timestamp = 133367543678908765L;
Date convertedDate =
convertADTimestamp(timestamp);
System.out.println(convertedDate);
}
One hint from me - you have to be carefull as this attribute does not sync across domain controllers. That means you might not always have correct data by aggregating it.
Also one suggestion from my side its better to have both lastLogonTimestamp and lastLogon attribute in SailPoint from AD aggregation for computing any dormancy use case.
Meanwhile Mr @Shandeep has already provided the code sample that you can use in your customization rule
One suggestion from my side , Don’t covert this as part of the customization rule , this rule will get called for each and every account during aggregation which can degrade the performance .
better if you have to show this value somewhere or use this somewhere , let it be in long value in link object and change this were ever you use this one to the required format .