Hi All,
We are writing a javascript to inquiry a lookup table and we would like to use the user role instead of the user (see token $env:user$
). We have checked in the documentation which are the available tokens described at the folllowing link:
But we would like to know if it is present a token for the user role, or if there is any other way to retrieve this information and use then in a javascript.
Thanks a lot,
Edoardo
This query, which you could run in the background on a dashboard containing JavaScript, will return the username and roles for the user accessing the dashboard:
| rest splunk_server=local /services/authentication/current-context
| table username roles