Splunk Cloud Platform

How to get all users with roles and last login

Marta88
Explorer

Hi,

I would like to get the list of all users, with roles and last login via splunk query.

I tried the following query with a time range of "alltime" but it shows incorrect date for some users: 

index=_audit action="login attempt" | stats max(timestamp) by user

Thank you,

Kind regards

Marta

 

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

How do you know it is incorrect? How are you validating the results?

0 Karma

Marta88
Explorer

I know that a colleague of mine login to the system today, instead for that query I get that the last login is in 2021.

KInd regards

Marta

 

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Have you found any events in _audit for them? (Try searching by their id)

0 Karma

Marta88
Explorer

Yes there is an event for my colleague for today.

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

What action is in that event? Why was it not found by your search?

0 Karma

Marta88
Explorer

I solved it using the "first" function

0 Karma
Get Updates on the Splunk Community!

Aligning Observability Costs with Business Value: Practical Strategies

 Join us for an engaging Tech Talk on Aligning Observability Costs with Business Value: Practical ...

Mastering Data Pipelines: Unlocking Value with Splunk

 In today's AI-driven world, organizations must balance the challenges of managing the explosion of data with ...

Splunk Up Your Game: Why It's Time to Embrace Python 3.9+ and OpenSSL 3.0

Did you know that for Splunk Enterprise 9.4, Python 3.9 is the default interpreter? This shift is not just a ...