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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...