Security

How to identify the logged in user (into splunk web) from custom python script?

soe_hlawin
Explorer

I have a custom script in which I have to perform different actions based on the user who invoked it. The script is a python script. Is there a way I can collect the logged-in user name?

I tried the below, which always gives me a None.

results,dummyresults,settings = splunk.Intersplunk.getOrganizedResults()
owner      = settings.get("owner", None)

Any other approach or clue would be very much helpful. Thanks in advance.

0 Karma

teetim
New Member
0 Karma
Get Updates on the Splunk Community!

Fun with Regular Expression - multiples of nine

Fun with Regular Expression - multiples of nineThis challenge was first posted on Slack #regex channel ...

[Live Demo] Watch SOC transformation in action with the reimagined Splunk Enterprise ...

Overwhelmed SOC? Splunk ES Has Your Back Tool sprawl, alert fatigue, and endless context switching are making ...

What’s New & Next in Splunk SOAR

Security teams today are dealing with more alerts, more tools, and more pressure than ever.  Join us on ...