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!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...