<?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: Add user with python SDK in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/Add-user-with-python-SDK/m-p/278904#M3493</link>
    <description>&lt;P&gt;You can set values only for the following fields&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;defaultApp
email
force-change-pass
password
realname
restart_background_jobs
roles
tz
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 13 Oct 2015 12:51:55 GMT</pubDate>
    <dc:creator>paramagurukarth</dc:creator>
    <dc:date>2015-10-13T12:51:55Z</dc:date>
    <item>
      <title>Add user with python SDK</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Add-user-with-python-SDK/m-p/278903#M3492</link>
      <description>&lt;P&gt;Hi, i'm learning Python SDK and i'm try to create a new user, with this code:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;users = service.users
new_user = users.create("my user", "empty password", roles="basic_user", type="Splunk")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;but i get this error:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;raise HTTPError(response)&lt;BR /&gt;
splunklib.binding.HTTPError: HTTP 400 Bad Request --&lt;BR /&gt;
 In handler 'users': Argument "type" is not supported by this handler.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;How to pass the auth type to the class Users? i try in different way, but no one works.&lt;/P&gt;

&lt;P&gt;In general, when in api reference i found something like this:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;params (dict) – Additional arguments (optional). For a list of available parameters, see User authentication parameters on Splunk Developer Portal.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;In which format i have to pass param?&lt;/P&gt;

&lt;P&gt;Thanks in advance and regards.&lt;/P&gt;

&lt;P&gt;P.S.&lt;/P&gt;

&lt;P&gt;I'm trying also:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;users = service.users
kwargs = {"type": "Splunk"}
new_user = users.create("wu", "test", roles="user", **kwargs)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But i get the same error&lt;/P&gt;

&lt;P&gt;P.P.S.&lt;/P&gt;

&lt;P&gt;Ok, this last method is correct, i tried with&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;kwargs = {"realname": "Some Name"}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and it works. So how can i pass the authetication method to this class?&lt;/P&gt;</description>
      <pubDate>Tue, 13 Oct 2015 09:33:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Add-user-with-python-SDK/m-p/278903#M3492</guid>
      <dc:creator>maurelio79</dc:creator>
      <dc:date>2015-10-13T09:33:54Z</dc:date>
    </item>
    <item>
      <title>Re: Add user with python SDK</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Add-user-with-python-SDK/m-p/278904#M3493</link>
      <description>&lt;P&gt;You can set values only for the following fields&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;defaultApp
email
force-change-pass
password
realname
restart_background_jobs
roles
tz
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 13 Oct 2015 12:51:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Add-user-with-python-SDK/m-p/278904#M3493</guid>
      <dc:creator>paramagurukarth</dc:creator>
      <dc:date>2015-10-13T12:51:55Z</dc:date>
    </item>
  </channel>
</rss>

