Splunk Search

Search events for multiple samaccountnames

papa
Explorer

Hello 

Cam someone assist on how to do a search like below for multiple samaccountnames ? 

ideally from a txt file or CSV ? so to reference the file in the search . 

 

 

 

<SamAccountName> EventCode=4624 | table _time,EventCode,src,user,Logon_Type

 

 

Labels (1)

inventsekar
SplunkTrust
SplunkTrust

Hi @papa , As @renjith_nair suggested, the lookup is one idea. or if you already ingested the 
multiple samaccountnames csv files to splunk, then, you can simply query the multiple files altogether.  my apologies if you already know this method. 

index=indexName <multiple-SamAccountNames> EventCode=4624 | table _time,EventCode,src,user,Logon_Type
thanks and best regards,
Sekar

PS - If this or any post helped you in any way, pls consider upvoting, thanks for reading !
0 Karma

renjith_nair
Legend

Try

index="your index" EventCode=4624 [|inputlookup SamAccountName.csv|fields SamAccountName] 

This should create an OR'd list of SamAccountName

---
What goes around comes around. If it helps, hit it with Karma 🙂
Get Updates on the Splunk Community!

Index This | Why did the turkey cross the road?

November 2025 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

  &#x1f680; Your data just got a serious AI upgrade — are you ready? Say hello to the Agentic Era with the ...

Feel the Splunk Love: Real Stories from Real Customers

Hello Splunk Community,    What’s the best part of hearing how our customers use Splunk? Easy: the positive ...