I found the following SQL query in my script repository. Run it on the Events Database:
/* List users and their last connection time for all or specific desktop pool */ SELECT ModuleAndEventText, MAX(Time) as Time FROM event_historical WHERE EventType = 'BROKER_DESKTOP_REQUEST' /* AND ModuleAndEventText LIKE '%Pool <poolID>%' */ GROUP BY ModuleAndEventText ORDER BY Time desc
I tried your sql query on our environment and get all logon events for the last 30 days.
What I want to see is user logon dates which are older than x-days so that I can find user which are orpahned or not active anymore in your enviroment. Any ideas how I can find them?
The script actually shows all unique users and their last login time. The results are ordered by descending time, so if you scroll down to e.g. 22/01/2022, any user below that line hasn't logged in in the last 30 days