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!

Strengthen Your Future: A Look Back at Splunk 10 Innovations and .conf25 Highlights!

The Big One: Splunk 10 is Here!  The moment many of you have been waiting for has arrived! We are thrilled to ...

Now Offering the AI Assistant Usage Dashboard in Cloud Monitoring Console

Today, we’re excited to announce the release of a brand new AI assistant usage dashboard in Cloud Monitoring ...

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

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