<?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 Re: How can I get list of users from rest api ? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-get-list-of-users-from-rest-api/m-p/361294#M65896</link>
    <description>&lt;P&gt;Hi egid_la,&lt;BR /&gt;
see the "Data Governance" App ( &lt;A href="https://splunkbase.splunk.com/app/1866/"&gt;https://splunkbase.splunk.com/app/1866/&lt;/A&gt; ) there are some dashboards with useful panels where you can copy the search.&lt;BR /&gt;
Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
    <pubDate>Wed, 15 Nov 2017 13:16:19 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2017-11-15T13:16:19Z</dc:date>
    <item>
      <title>How can I get list of users from rest api ?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-get-list-of-users-from-rest-api/m-p/361290#M65892</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;

&lt;P&gt;I'm currently running Splunk 6.5.3&lt;/P&gt;

&lt;P&gt;I want list of all users who has access to splunk.  &lt;/P&gt;

&lt;P&gt;|rest /services/authentication/users splunk_server=local &lt;BR /&gt;
 |fields title roles realname|rename title as userName|rename realname as Name&lt;/P&gt;

&lt;P&gt;query 1 :&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/3837iE6C3C5B66E3CB6C0/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;query 2 (If i remove splunk_server=local) :&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/3838iDD53B8CFD913233C/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;I've admin privileges but i can't see all users &lt;/P&gt;

&lt;P&gt;Why i have a error message with query 1 ?&lt;/P&gt;

&lt;P&gt;Why i am unable to see all users with admin privileges (query 2) ?&lt;/P&gt;</description>
      <pubDate>Tue, 14 Nov 2017 09:01:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-get-list-of-users-from-rest-api/m-p/361290#M65892</guid>
      <dc:creator>egid_la</dc:creator>
      <dc:date>2017-11-14T09:01:40Z</dc:date>
    </item>
    <item>
      <title>Re: How can I get list of users from rest api ?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-get-list-of-users-from-rest-api/m-p/361291#M65893</link>
      <description>&lt;P&gt;i just ran that query with and without splunk_server=local and both worked. with it, it only showed my user, without, it showed all users. i see you got that error message on both searches though. if you inspect the job, can you see the full error message?&lt;/P&gt;</description>
      <pubDate>Tue, 14 Nov 2017 21:20:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-get-list-of-users-from-rest-api/m-p/361291#M65893</guid>
      <dc:creator>cmerriman</dc:creator>
      <dc:date>2017-11-14T21:20:07Z</dc:date>
    </item>
    <item>
      <title>Re: How can I get list of users from rest api ?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-get-list-of-users-from-rest-api/m-p/361292#M65894</link>
      <description>&lt;P&gt;I can see for query 1 :&lt;/P&gt;

&lt;P&gt;This search has completed, but did not match any events. The terms specified in the highlighted portion of the search:&lt;/P&gt;

&lt;P&gt;rest /services/authentication/users splunk_server=local | fields title roles realname | rename title as userName | rename realname as Name  &lt;/P&gt;

&lt;P&gt;over the time range:&lt;/P&gt;

&lt;P&gt;15/11/2017 00:00:00.000 - 15/11/2017 09:50:58.000&lt;/P&gt;

&lt;P&gt;did not return any data. Possible solutions are to:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;relax the primary search criteria
widen the time range of the search
check that the default search indexes for your account include the desired indexes
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Learn more about troubleshooting empty search results at Splunk Documentation&lt;/P&gt;

&lt;P&gt;The following messages were returned by the search subsystem:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;error : Failed to parse XML Body:&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt; &amp;lt;!--This is to override b...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;(SID: 1510735858.14014_7E34E620-2F98-4859-B68C-61B049217E6D) search.log&lt;/P&gt;

&lt;P&gt;and query 2 :&lt;/P&gt;

&lt;P&gt;This search has completed and has returned 12 results by scanning 12 events in 0.847 seconds&lt;/P&gt;

&lt;P&gt;The following messages were returned by the search subsystem:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;error : Failed to parse XML Body:&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt; &amp;lt;!--This is to override b...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;(SID: 1510735648.13854_7E34E620-2F98-4859-B68C-61B049217E6D) search.log&lt;/P&gt;

&lt;P&gt;I'm on splunk multi site search head cluster&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2017 08:52:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-get-list-of-users-from-rest-api/m-p/361292#M65894</guid>
      <dc:creator>egid_la</dc:creator>
      <dc:date>2017-11-15T08:52:36Z</dc:date>
    </item>
    <item>
      <title>Re: How can I get list of users from rest api ?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-get-list-of-users-from-rest-api/m-p/361293#M65895</link>
      <description>&lt;P&gt;&lt;CODE&gt;| rest /services/authentication/current-context | where NOT username="splunk-system-user" | fields username realname&lt;/CODE&gt; do you get errors when running this? or does it populate your user?&lt;/P&gt;

&lt;P&gt;try adding &lt;CODE&gt;splunk_server=*&lt;/CODE&gt; instead of &lt;CODE&gt;local&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;try adding the deployment server as a search peer to access the rest api endpoints by going to settings&amp;gt;distributed search&amp;gt;search peers and see if something isn't configured properly.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2017 12:47:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-get-list-of-users-from-rest-api/m-p/361293#M65895</guid>
      <dc:creator>cmerriman</dc:creator>
      <dc:date>2017-11-15T12:47:39Z</dc:date>
    </item>
    <item>
      <title>Re: How can I get list of users from rest api ?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-get-list-of-users-from-rest-api/m-p/361294#M65896</link>
      <description>&lt;P&gt;Hi egid_la,&lt;BR /&gt;
see the "Data Governance" App ( &lt;A href="https://splunkbase.splunk.com/app/1866/"&gt;https://splunkbase.splunk.com/app/1866/&lt;/A&gt; ) there are some dashboards with useful panels where you can copy the search.&lt;BR /&gt;
Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2017 13:16:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-get-list-of-users-from-rest-api/m-p/361294#M65896</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-11-15T13:16:19Z</dc:date>
    </item>
    <item>
      <title>Re: How can I get list of users from rest api ?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-get-list-of-users-from-rest-api/m-p/361295#M65897</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;| rest /services/authentication/current-context | where NOT username="splunk-system-user" | fields username realname : No errors, it shows only my user but not all
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If i try with :&lt;/P&gt;

&lt;P&gt;| rest /services/authentication/users splunk_server=* &lt;BR /&gt;
| fields title roles realname &lt;BR /&gt;
| rename title as userName &lt;BR /&gt;
| rename realname as Name&lt;/P&gt;

&lt;P&gt;i have same result as query 2 (it shows users but just admins)&lt;/P&gt;

&lt;P&gt;I can't see distributed search on settings or it's another name depends on version&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2017 13:31:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-get-list-of-users-from-rest-api/m-p/361295#M65897</guid>
      <dc:creator>egid_la</dc:creator>
      <dc:date>2017-11-15T13:31:00Z</dc:date>
    </item>
    <item>
      <title>Re: How can I get list of users from rest api ?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-get-list-of-users-from-rest-api/m-p/701847#M116130</link>
      <description>&lt;P&gt;this worked for me&lt;/P&gt;&lt;PRE&gt;| rest /services/authentication/current-context&lt;/PRE&gt;&lt;P&gt;thanks!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Oct 2024 18:35:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-get-list-of-users-from-rest-api/m-p/701847#M116130</guid>
      <dc:creator>highsplunker</dc:creator>
      <dc:date>2024-10-14T18:35:26Z</dc:date>
    </item>
  </channel>
</rss>

