<?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 Find user does not working on Python code in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/Find-user-does-not-working-on-Python-code/m-p/306756#M4047</link>
    <description>&lt;P&gt;Following code is to find specific user("eveadams"). But it does not work.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;# Find User
kwargs = {"name": "eveadams"}

try:
    users = service.users.list(**kwargs)
    for user in users:
        print "%s - %s" % (user.realname, user.name)

except: # new user
    print "Cannot find the user"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;eveadams is already exist in splunk. But the result is always "Cannot find...".&lt;/P&gt;</description>
    <pubDate>Thu, 29 Mar 2018 05:51:29 GMT</pubDate>
    <dc:creator>Jooyoung</dc:creator>
    <dc:date>2018-03-29T05:51:29Z</dc:date>
    <item>
      <title>Find user does not working on Python code</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Find-user-does-not-working-on-Python-code/m-p/306756#M4047</link>
      <description>&lt;P&gt;Following code is to find specific user("eveadams"). But it does not work.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;# Find User
kwargs = {"name": "eveadams"}

try:
    users = service.users.list(**kwargs)
    for user in users:
        print "%s - %s" % (user.realname, user.name)

except: # new user
    print "Cannot find the user"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;eveadams is already exist in splunk. But the result is always "Cannot find...".&lt;/P&gt;</description>
      <pubDate>Thu, 29 Mar 2018 05:51:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Find-user-does-not-working-on-Python-code/m-p/306756#M4047</guid>
      <dc:creator>Jooyoung</dc:creator>
      <dc:date>2018-03-29T05:51:29Z</dc:date>
    </item>
    <item>
      <title>Re: Find user does not working on Python code</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Find-user-does-not-working-on-Python-code/m-p/306757#M4048</link>
      <description>&lt;P&gt;Can you try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;kwargs = {"name": "eveadams"}
users = service.users.list(**kwargs)
 try:
     for user in users:
         print "%s - %s" % (user.realname, user.name)
 except: # new user
     print "Cannot find the user"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 29 Mar 2018 11:03:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Find-user-does-not-working-on-Python-code/m-p/306757#M4048</guid>
      <dc:creator>p_gurav</dc:creator>
      <dc:date>2018-03-29T11:03:13Z</dc:date>
    </item>
  </channel>
</rss>

