Click HERE to see how Saviynt Intelligence is transforming the industry. |
06/12/2024 02:54 PM
Hi I have a need to check the last logon value on an account's CustomProperty that has a date value stored as a unix timestamp and if its greater than 60 days in the past, disable the associated account. I believe this is possible leveraging actionable analytics report in some way but have read conflicting information on some forums post. That being said, is it possible to accomplish this via actionable analytics or is there some other better OOTB way?
If its possible, are there any examples of how to create the analytics query to pull the date from the CP, do a conversion from unix timestamp to a date and check to see if its 60 days in the past? Then generate a disable account task.
The only other option that comes to mind is to leverage sav4sav to pull the value and store it on the user record, then potentially could use either an adv query in user update rule or maybe pre-processor config to do the date conversion and 60 day check.
06/12/2024 09:34 PM
Share sample date format
06/13/2024 06:01 AM
I was able to convert this unix timestamp to just a date using the following: SELECT DISTINCT NAME, DATE_FORMAT(FROM_UNIXTIME(customproperty6), '%Y-%m-%d') AS date FROM accounts WHERE customproperty6 IS NOT NULL AND endpointkey = '2';
The problem is that when I use this analytics in the user import config below:
{
"connection": "userAuth",
"successResponses": {
"statusCode": [
200,
201,
202,
203,
204,
205
]
},
"url": "https://removed-dev.saviyntcloud.com/ECM/api/v5/fetchRuntimeControlsData",
"httpParams": "{\"analyticsname\": \"DUO Update Last Login\"}",
"httpMethod": "POST",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"userResponsePath": "result",
"colsToPropsMap": {
"systemUserName": "NAME~#~char",
"customproperty50": "DATE~#~string"
},
"pagination": {
"offset": {
"offsetParam": "offset",
"batchParam": "displaycount",
"batchSize": 500,
"totalCountPath": "completeResponseMap.total"
}
}
}
I get errors like this
"2024-06-13T12:53:27.781+00:00","ecm","services.SaviyntCommonUtilityService","http-nio-8080-exec-24-99k6w","DEBUG","contentType - text/json"
"2024-06-13T12:53:27.782+00:00","ecm","services.SaviyntCommonUtilityService","http-nio-8080-exec-24-99k6w","DEBUG","contentTypeFromConfig - application/json"
"2024-06-13T12:53:27.846+00:00","ecm","analytics.AnalyticsHistoryService","http-nio-8080-exec-5-99k6w","DEBUG","Inside retrieveColumnsAndFilters"
"2024-06-13T12:53:27.846+00:00","ecm","analytics.AnalyticsHistoryService","http-nio-8080-exec-5-99k6w","DEBUG","returnMap:: [leftFilterWithDefaultFeildList:[], columnAndTypeMap:[DATE:1, NAME:1], selectedFilterCols:[NAME, DATE], selectedCols:[NAME###1, DATE###1]]"
"2024-06-13T12:53:27.846+00:00","ecm","analytics.AnalyticsHistoryService","http-nio-8080-exec-5-99k6w","DEBUG","Exit retrieveColumnsAndFilters"
"2024-06-13T12:53:27.847+00:00","ecm","analytics.AnalyticsHistoryController","http-nio-8080-exec-5-99k6w","DEBUG","result list size 657"
"2024-06-13T12:53:26.691+00:00","ecm","analytics.AnalyticsHistoryService","http-nio-8080-exec-7-99k6w","ERROR","Unparseable date: "2024-04-17""
"2024-06-13T12:53:26.691+00:00","ecm","analytics.AnalyticsHistoryService","http-nio-8080-exec-7-99k6w","ERROR","Unparseable date: "2023-10-25""
"2024-06-13T12:53:26.691+00:00","ecm","analytics.AnalyticsHistoryService","http-nio-8080-exec-7-99k6w","ERROR","Unparseable date: "2023-05-12""
"2024-06-13T12:53:26.691+00:00","ecm","analytics.AnalyticsHistoryService","http-nio-8080-exec-7-99k6w","ERROR","Unparseable date: "2024-06-03""
"2024-06-13T12:53:26.691+00:00","ecm","analytics.AnalyticsHistoryService","http-nio-8080-exec-7-99k6w","ERROR","Unparseable date: "2024-05-20""
"2024-06-13T12:53:26.691+00:00","ecm","analytics.AnalyticsHistoryService","http-nio-8080-exec-7-99k6w","ERROR","Unparseable date: "2024-06-06""
"2024-06-13T12:53:26.692+00:00","ecm","analytics.AnalyticsHistoryService","http-nio-8080-exec-7-99k6w","ERROR","Unparseable date: "2023-05-19""
"2024-06-13T12:53:26.692+00:00","ecm","analytics.AnalyticsHistoryService","http-nio-8080-exec-7-99k6w","ERROR","Unparseable date: "2024-06-07""
"2024-06-13T12:53:26.692+00:00","ecm","analytics.AnalyticsHistoryService","http-nio-8080-exec-7-99k6w","ERROR","Unparseable date: "2024-05-10""
"2024-06-13T12:53:26.692+00:00","ecm","analytics.AnalyticsHistoryService","http-nio-8080-exec-7-99k6w","ERROR","Unparseable date: "2024-06-07""
"2024-06-13T12:53:26.692+00:00","ecm","analytics.AnalyticsHistoryService","http-nio-8080-exec-7-99k6w","ERROR","Unparseable date: "2024-06-07""
"2024-06-13T12:53:26.692+00:00","ecm","analytics.AnalyticsHistoryService","http-nio-8080-exec-7-99k6w","ERROR","Unparseable date: "2023-05-08""
Despite the analytics results looking fine
What am I overlooking here?
06/13/2024 06:14 AM
SELECT DISTINCT NAME, DATE_FORMAT(FROM_UNIXTIME(customproperty6), '%Y-%m-%d') AS dateconverted FROM accounts WHERE customproperty6 IS NOT NULL AND endpointkey = '2';