We are delighted to share our new EIC Delivery Methodology for efficiently managing Saviynt Implementations and delivering quick time to value. CLICK HERE.

How can i get date and time of the first rule that triggered in useshistory

Siva
Regular Contributor
Regular Contributor

We have a issue with createdate in user profile , we thought of taking first ruletriggere date as createdate.

I am using the below query , but its not fetching that attribute(createddate);-

select u.startdate,uh.ruleruns from users u inner join usershistory uh on u.userkey=uh.userkey where uh.RULERUNS like '%PasswordEndUserRoleAssignment%';

Siva_0-1679579299778.png

I need to fetch the first rule triggere date ,Can you please suggest any inputs here?

Thanks & best regards,
Siva Avula

3 REPLIES 3

DixshantValecha
Saviynt Employee
Saviynt Employee

It looks like you are trying to fetch the first rule triggered date from the user profile. However, the query you are using is not fetching that attribute(createddate).

I would suggest you to try using the following query instead -

SELECT MIN(uh.startdate) as createddate FROM usershistory uh WHERE uh.RULERUNS LIKE ‘%PasswordEndUserRoleAssignment%’;

Let me know if this helps or if you have any other questions or concerns.

Siva
Regular Contributor
Regular Contributor

Hi @DixshantValecha 

Thanks for the query, Its throwing error because of  usershistory (uh.startdate). If i remove it and run then its working.
Could you please suggest anyother attribute or field that fetch date of rule triggered

Thanks
Siva Avula

DixshantValecha
Saviynt Employee
Saviynt Employee