<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How do I create a search that displays the amount of users on each app and how often it's been used in the last 60 days? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-create-a-search-that-displays-the-amount-of-users-on/m-p/607913#M211371</link>
    <description>&lt;P&gt;I'm trying to create a table that displays the following result&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="20%"&gt;Appname&lt;/TD&gt;
&lt;TD width="20%"&gt;Amount of users with read access&lt;/TD&gt;
&lt;TD width="20%"&gt;amount of users that have accessed in the last 2 months&lt;/TD&gt;
&lt;TD width="20%"&gt;Open Access&lt;/TD&gt;
&lt;TD width="20%"&gt;Protected Access&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="20%"&gt;AppX&lt;/TD&gt;
&lt;TD width="20%"&gt;&amp;lt;number&amp;gt;&lt;/TD&gt;
&lt;TD width="20%"&gt;&amp;lt;number&amp;gt;&lt;/TD&gt;
&lt;TD width="20%"&gt;O&lt;/TD&gt;
&lt;TD width="20%"&gt;P&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I know that I can use the rest api for most (maybe all) of this.&lt;/P&gt;
&lt;P&gt;The following tells me which apps there are and with what roles a user has read access.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;| rest /servicesNS/-/-/apps/local splunk_server="local" 
| fields label, eai:acl.perms.read 
| rename eai:acl.perms.read as roles
| sort by label 
| search label!=_searchhead_config&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The following tells me what users there are and what roles they have.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;| rest /services/authentication/users splunk_server=local 
| fields title roles 
| mvexpand roles
| rename title as userName&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What I want to do now is to combine those and by the roles, match which users have access to a certain app, and than count how many there are.&lt;/P&gt;
&lt;P&gt;I'm a newbie and I've tried all kinds of things with join, append, appendcols but it never gives me the results I need. Can someone point me in the right direction?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 02 Aug 2022 15:21:01 GMT</pubDate>
    <dc:creator>SevenDos</dc:creator>
    <dc:date>2022-08-02T15:21:01Z</dc:date>
    <item>
      <title>How do I create a search that displays the amount of users on each app and how often it's been used in the last 60 days?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-create-a-search-that-displays-the-amount-of-users-on/m-p/607913#M211371</link>
      <description>&lt;P&gt;I'm trying to create a table that displays the following result&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="20%"&gt;Appname&lt;/TD&gt;
&lt;TD width="20%"&gt;Amount of users with read access&lt;/TD&gt;
&lt;TD width="20%"&gt;amount of users that have accessed in the last 2 months&lt;/TD&gt;
&lt;TD width="20%"&gt;Open Access&lt;/TD&gt;
&lt;TD width="20%"&gt;Protected Access&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="20%"&gt;AppX&lt;/TD&gt;
&lt;TD width="20%"&gt;&amp;lt;number&amp;gt;&lt;/TD&gt;
&lt;TD width="20%"&gt;&amp;lt;number&amp;gt;&lt;/TD&gt;
&lt;TD width="20%"&gt;O&lt;/TD&gt;
&lt;TD width="20%"&gt;P&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I know that I can use the rest api for most (maybe all) of this.&lt;/P&gt;
&lt;P&gt;The following tells me which apps there are and with what roles a user has read access.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;| rest /servicesNS/-/-/apps/local splunk_server="local" 
| fields label, eai:acl.perms.read 
| rename eai:acl.perms.read as roles
| sort by label 
| search label!=_searchhead_config&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The following tells me what users there are and what roles they have.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;| rest /services/authentication/users splunk_server=local 
| fields title roles 
| mvexpand roles
| rename title as userName&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What I want to do now is to combine those and by the roles, match which users have access to a certain app, and than count how many there are.&lt;/P&gt;
&lt;P&gt;I'm a newbie and I've tried all kinds of things with join, append, appendcols but it never gives me the results I need. Can someone point me in the right direction?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Aug 2022 15:21:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-create-a-search-that-displays-the-amount-of-users-on/m-p/607913#M211371</guid>
      <dc:creator>SevenDos</dc:creator>
      <dc:date>2022-08-02T15:21:01Z</dc:date>
    </item>
    <item>
      <title>Re: How do I create a search that displays the amount of users on each app and how often it's been used in the last 60 d</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-create-a-search-that-displays-the-amount-of-users-on/m-p/607981#M211400</link>
      <description>&lt;P&gt;Here's one way to combine those searches.&amp;nbsp; I'm sure there are other possibilities.&amp;nbsp; It depends on what the output needs to look like.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rest /servicesNS/-/-/apps/local splunk_server="local" 
| fields label, eai:acl.perms.read 
| rename eai:acl.perms.read as roles 
| mvexpand roles 
| sort by label 
| search label!=_searchhead_config 
| append 
    [| rest /services/authentication/users splunk_server=local 
    | fields title roles 
    | eval roles=mvappend (roles, "*") 
    | mvexpand roles 
    | rename title as userName] 
| stats values(*) as * by roles 
| table userName roles label&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2022 13:28:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-create-a-search-that-displays-the-amount-of-users-on/m-p/607981#M211400</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2022-08-03T13:28:50Z</dc:date>
    </item>
    <item>
      <title>Re: How do I create a search that displays the amount of users on each app and how often it's been used in the last 60 d</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-create-a-search-that-displays-the-amount-of-users-on/m-p/608035#M211413</link>
      <description>&lt;P&gt;Thanks for the response. What is happening in line 14? Is that an accidental paste that I should remove, or does there have to be an additional join there? Looks like the former as this is where the search starts with. Removing it tells me there is no roles.&lt;/P&gt;&lt;P&gt;I would want the output to look like:&lt;/P&gt;&lt;TABLE border="1" width="63.99810606060606%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;label (name of the app)&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;amount of users that have read access to this app&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Wed, 03 Aug 2022 08:28:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-create-a-search-that-displays-the-amount-of-users-on/m-p/608035#M211413</guid>
      <dc:creator>SevenDos</dc:creator>
      <dc:date>2022-08-03T08:28:46Z</dc:date>
    </item>
    <item>
      <title>Re: How do I create a search that displays the amount of users on each app and how often it's been used in the last 60 d</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-create-a-search-that-displays-the-amount-of-users-on/m-p/608082#M211430</link>
      <description>&lt;P&gt;Sorry about the copy-paste error.&amp;nbsp; I've fixed it.&lt;/P&gt;&lt;P&gt;The current query produces a list of apps, the roles with access to the apps, and users with those roles.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2022 13:30:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-create-a-search-that-displays-the-amount-of-users-on/m-p/608082#M211430</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2022-08-03T13:30:55Z</dc:date>
    </item>
  </channel>
</rss>

