<?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 Rest API get users assigned to a role in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Rest-API-get-users-assigned-to-a-role/m-p/379055#M68525</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I'm trying to make a REST call to get the list of users assigned to a particular role. Is there any such call that can get me this information? I found&lt;BR /&gt;
&lt;A href="https://:8089/servicesNS/admin/UserRoleChecker/authentication/users" target="test_blank"&gt;https://:8089/servicesNS/admin/UserRoleChecker/authentication/users&lt;/A&gt; which is more of a form &lt;BR /&gt;
  1User -&amp;gt; nRoles,&lt;BR /&gt;
But I was looking for &lt;BR /&gt;
  1Role -&amp;gt; nUsers kind of a data.&lt;/P&gt;

&lt;P&gt;Is there any such api call?&lt;/P&gt;</description>
    <pubDate>Thu, 04 Jul 2019 08:39:51 GMT</pubDate>
    <dc:creator>ebythomaspanick</dc:creator>
    <dc:date>2019-07-04T08:39:51Z</dc:date>
    <item>
      <title>Rest API get users assigned to a role</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Rest-API-get-users-assigned-to-a-role/m-p/379055#M68525</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I'm trying to make a REST call to get the list of users assigned to a particular role. Is there any such call that can get me this information? I found&lt;BR /&gt;
&lt;A href="https://:8089/servicesNS/admin/UserRoleChecker/authentication/users" target="test_blank"&gt;https://:8089/servicesNS/admin/UserRoleChecker/authentication/users&lt;/A&gt; which is more of a form &lt;BR /&gt;
  1User -&amp;gt; nRoles,&lt;BR /&gt;
But I was looking for &lt;BR /&gt;
  1Role -&amp;gt; nUsers kind of a data.&lt;/P&gt;

&lt;P&gt;Is there any such api call?&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jul 2019 08:39:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Rest-API-get-users-assigned-to-a-role/m-p/379055#M68525</guid>
      <dc:creator>ebythomaspanick</dc:creator>
      <dc:date>2019-07-04T08:39:51Z</dc:date>
    </item>
    <item>
      <title>Re: Rest API get users assigned to a role</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Rest-API-get-users-assigned-to-a-role/m-p/379056#M68526</link>
      <description>&lt;P&gt;@ebythomaspanicker it is not &lt;CODE&gt;1 --&amp;gt; N&lt;/CODE&gt; it is &lt;CODE&gt;N --&amp;gt; N&lt;/CODE&gt; so you can use the same REST API and pass specific role/s as per your need and display N User/s returned.&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/7301iCE8123A853C84748/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;Try the following run anywhere dashboard examples which uses &lt;CODE&gt;| rest /services/authorization/roles/ | fields title&lt;/CODE&gt; REST API to get the available Roles. Then on selection of Role/s it displays available roles.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;form&amp;gt;
  &amp;lt;label&amp;gt;Users Belonging to Particular Role&amp;lt;/label&amp;gt;
  &amp;lt;fieldset submitButton="false"&amp;gt;&amp;lt;/fieldset&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;title&amp;gt;Select Roles and combination type to find Users belonging to the Roles&amp;lt;/title&amp;gt;
      &amp;lt;input type="radio" token="tokConjuction" searchWhenChanged="true"&amp;gt;
        &amp;lt;label&amp;gt;Combine Roles by&amp;lt;/label&amp;gt;
        &amp;lt;choice value="AND"&amp;gt;AND&amp;lt;/choice&amp;gt;
        &amp;lt;choice value="OR"&amp;gt;OR&amp;lt;/choice&amp;gt;
        &amp;lt;default&amp;gt;AND&amp;lt;/default&amp;gt;
        &amp;lt;change&amp;gt;
          &amp;lt;unset token="form.tokRoles"&amp;gt;&amp;lt;/unset&amp;gt;
        &amp;lt;/change&amp;gt;
      &amp;lt;/input&amp;gt;
      &amp;lt;input type="multiselect" token="tokRoles" searchWhenChanged="true"&amp;gt;
        &amp;lt;label&amp;gt;Available Roles&amp;lt;/label&amp;gt;
        &amp;lt;valuePrefix&amp;gt;roles=\"&amp;lt;/valuePrefix&amp;gt;
        &amp;lt;valueSuffix&amp;gt;\"&amp;lt;/valueSuffix&amp;gt;
        &amp;lt;delimiter&amp;gt; $tokConjuction$ &amp;lt;/delimiter&amp;gt;
        &amp;lt;fieldForLabel&amp;gt;title&amp;lt;/fieldForLabel&amp;gt;
        &amp;lt;fieldForValue&amp;gt;title&amp;lt;/fieldForValue&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;| rest /services/authorization/roles/
| fields title&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;-24h@h&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
        &amp;lt;/search&amp;gt;
      &amp;lt;/input&amp;gt;
      &amp;lt;table&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;| rest /services/authentication/users search="$tokRoles$"
| fields title
| rename title as "User/s (for selected Roles)"&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;-24h@h&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
          &amp;lt;sampleRatio&amp;gt;1&amp;lt;/sampleRatio&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="count"&amp;gt;20&amp;lt;/option&amp;gt;
        &amp;lt;option name="dataOverlayMode"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="percentagesRow"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="refresh.display"&amp;gt;progressbar&amp;lt;/option&amp;gt;
        &amp;lt;option name="rowNumbers"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="totalsRow"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="wrap"&amp;gt;true&amp;lt;/option&amp;gt;
      &amp;lt;/table&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/form&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 04 Jul 2019 17:32:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Rest-API-get-users-assigned-to-a-role/m-p/379056#M68526</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2019-07-04T17:32:32Z</dc:date>
    </item>
  </channel>
</rss>

