Dashboards & Visualizations

Issue with env Token and how to set it on Dashboard Load ?

shivamagrawa
Explorer

Hello,

I am trying to get the user who is accessing the dashboard and based on that want to decide if dashboards panel will be display to him or not.

 

<form theme="dark">
  <search>
    <query>
      | rest /services/authentication/current-context | table email
      | eval master_token=email
    </query>
    <progress>
      <condition match="$master_token$==&quot;ss@gmail.com&quot;">
        <set token="access">True</set>
      </condition>
    </progress>
  </search>
  <label>Screen Time</label>

 

 

Now, no matter what email is there the access token is always true. Can someone please help me with the right way of doing it ?

Also if i can use $env:user_email$ in someway here ?

Labels (1)
0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...