<?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: Splunk _internal call to give multiple values to a parameter in Security</title>
    <link>https://community.splunk.com/t5/Security/Splunk-internal-call-to-give-multiple-values-to-a-parameter/m-p/185698#M14773</link>
    <description>&lt;P&gt;The documentation is here: &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.0.2/RESTAPI/RESTaccess#POST_authentication.2Fusers"&gt;http://docs.splunk.com/Documentation/Splunk/6.0.2/RESTAPI/RESTaccess#POST_authentication.2Fusers&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;For the roles parameter it says "A role to assign to this user. To assign multiple roles, send them in separate roles parameters." Hence you can amend your call like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;/opt/splunk/bin/splunk _internal call /services/authentication/users/ -post:name "prem" -post:password "pass" -post:roles "admin" -post:roles "some_role" -post:roles "another_role" -auth user:pwd
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 13 Mar 2014 12:17:43 GMT</pubDate>
    <dc:creator>martin_mueller</dc:creator>
    <dc:date>2014-03-13T12:17:43Z</dc:date>
    <item>
      <title>Splunk _internal call to give multiple values to a parameter</title>
      <link>https://community.splunk.com/t5/Security/Splunk-internal-call-to-give-multiple-values-to-a-parameter/m-p/185697#M14772</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I make use of _internal call to add users to the splunk as follows.&lt;BR /&gt;
/opt/splunk/bin/splunk _internal call /services/authentication/users/ -post:name "prem" -post:password "pass" -post:roles "admin" -auth user:pwd&lt;/P&gt;

&lt;P&gt;But here i want to assign multiple roles to an user.Is it possible to assign multiple values during user creation or append any role to the user after the user got created?If yes please help with the synatx .&lt;/P&gt;</description>
      <pubDate>Thu, 13 Mar 2014 09:35:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Splunk-internal-call-to-give-multiple-values-to-a-parameter/m-p/185697#M14772</guid>
      <dc:creator>premg</dc:creator>
      <dc:date>2014-03-13T09:35:25Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk _internal call to give multiple values to a parameter</title>
      <link>https://community.splunk.com/t5/Security/Splunk-internal-call-to-give-multiple-values-to-a-parameter/m-p/185698#M14773</link>
      <description>&lt;P&gt;The documentation is here: &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.0.2/RESTAPI/RESTaccess#POST_authentication.2Fusers"&gt;http://docs.splunk.com/Documentation/Splunk/6.0.2/RESTAPI/RESTaccess#POST_authentication.2Fusers&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;For the roles parameter it says "A role to assign to this user. To assign multiple roles, send them in separate roles parameters." Hence you can amend your call like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;/opt/splunk/bin/splunk _internal call /services/authentication/users/ -post:name "prem" -post:password "pass" -post:roles "admin" -post:roles "some_role" -post:roles "another_role" -auth user:pwd
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 13 Mar 2014 12:17:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Splunk-internal-call-to-give-multiple-values-to-a-parameter/m-p/185698#M14773</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-03-13T12:17:43Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk _internal call to give multiple values to a parameter</title>
      <link>https://community.splunk.com/t5/Security/Splunk-internal-call-to-give-multiple-values-to-a-parameter/m-p/185699#M14774</link>
      <description>&lt;P&gt;Many thanks.&lt;BR /&gt;
But i have a concern here.Say now the user prem is created with 3 roles admin,some_role,another_role.Suppose if i want to assign one more new role,how the syntax would be?&lt;/P&gt;

&lt;P&gt;Say if i do as below,the already assigned roles would be off and only role would be new_role.&lt;BR /&gt;
/opt/splunk/bin/splunk _internalcall /services/authentication/users/prem -post:roles "new_role" -auth user:pwd&lt;/P&gt;

&lt;P&gt;Any idea on this?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 16:07:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Splunk-internal-call-to-give-multiple-values-to-a-parameter/m-p/185699#M14774</guid>
      <dc:creator>jerinabeham</dc:creator>
      <dc:date>2020-09-28T16:07:23Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk _internal call to give multiple values to a parameter</title>
      <link>https://community.splunk.com/t5/Security/Splunk-internal-call-to-give-multiple-values-to-a-parameter/m-p/185700#M14775</link>
      <description>&lt;P&gt;As per &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.0.2/RESTAPI/RESTaccess#POST_authentication.2Fusers.2F.7Bname.7D"&gt;http://docs.splunk.com/Documentation/Splunk/6.0.2/RESTAPI/RESTaccess#POST_authentication.2Fusers.2F.7Bname.7D&lt;/A&gt; you will need to specify the entire value for the field &lt;CODE&gt;roles&lt;/CODE&gt;, in your example like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;./splunk _internal call /services/authentication/users/prem -post:roles "admin" -post:roles "some_role" -post:roles "another_role" -post:roles "new_role"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You're passing a new value for &lt;CODE&gt;roles&lt;/CODE&gt;, so if the value you pass only has one entry in it then you will drop the old values. Else there would be no way to remove a role from a user.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Mar 2014 13:30:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Splunk-internal-call-to-give-multiple-values-to-a-parameter/m-p/185700#M14775</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-03-13T13:30:31Z</dc:date>
    </item>
  </channel>
</rss>

