Splunk Search

Query to find the latest time entry for lastlogonTimestamp from AD logs for a list of users?

LintuMathews
Explorer

Hi

Can you please help with a query that will pick the latest time entry captured for lastlogonTimestamp from AD logs for a particular list of users

Tags (2)
1 Solution

LintuMathews
Explorer

Thanks, I used this query and it works:

index=msad lastLogonTimestamp | stats latest(lastLogonTimestamp) by employeeID

View solution in original post

LintuMathews
Explorer

Thanks, I used this query and it works:

index=msad lastLogonTimestamp | stats latest(lastLogonTimestamp) by employeeID

jodros
Builder

You could probably leverage the dedup command and key in on user. This would only show the most recent event for that user. You could also leverage a lookup table file for all of the users you are interested in.

0 Karma
Get Updates on the Splunk Community!

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI! Discover how Splunk’s agentic AI ...

[Puzzles] Solve, Learn, Repeat: Dereferencing XML to Fixed-length events

This challenge was first posted on Slack #puzzles channelFor a previous puzzle, I needed a set of fixed-length ...

Stay Connected: Your Guide to December Tech Talks, Office Hours, and Webinars!

What are Community Office Hours? Community Office Hours is an interactive 60-minute Zoom series where ...