<?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 Getting error while searching for portal users in PortalPy in ArcGIS Enterprise Portal Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-portal-questions/getting-error-while-searching-for-portal-users-in/m-p/11683#M151</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using PortalPy to search for and return users. I am getting the following error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'NoneType' object has no attribute 'get'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get the error whether I use 'search_users' or 'get_org_users'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The error only occurs when I attempt to return all users. If I search for a specific user or set of users they return fine. My code is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;portal = portalpy.Portal(portalUrl, portalAdminUser, portalAdminPassword)&lt;BR /&gt; users = portal.search_users('')&lt;/P&gt;&lt;P&gt;print(users)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any thought as to what the cause is? There are no obvious problems with our portal users that would make them None objects. The same code worked previously.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also possibly related is this new message when the script is run "No handlers could be found for logger "portalpy""&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 05 Sep 2016 00:50:13 GMT</pubDate>
    <dc:creator>GregStevenson</dc:creator>
    <dc:date>2016-09-05T00:50:13Z</dc:date>
    <item>
      <title>Getting error while searching for portal users in PortalPy</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-portal-questions/getting-error-while-searching-for-portal-users-in/m-p/11683#M151</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using PortalPy to search for and return users. I am getting the following error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'NoneType' object has no attribute 'get'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get the error whether I use 'search_users' or 'get_org_users'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The error only occurs when I attempt to return all users. If I search for a specific user or set of users they return fine. My code is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;portal = portalpy.Portal(portalUrl, portalAdminUser, portalAdminPassword)&lt;BR /&gt; users = portal.search_users('')&lt;/P&gt;&lt;P&gt;print(users)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any thought as to what the cause is? There are no obvious problems with our portal users that would make them None objects. The same code worked previously.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also possibly related is this new message when the script is run "No handlers could be found for logger "portalpy""&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Sep 2016 00:50:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-portal-questions/getting-error-while-searching-for-portal-users-in/m-p/11683#M151</guid>
      <dc:creator>GregStevenson</dc:creator>
      <dc:date>2016-09-05T00:50:13Z</dc:date>
    </item>
    <item>
      <title>Re: Getting error while searching for portal users in PortalPy</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-portal-questions/getting-error-while-searching-for-portal-users-in/m-p/11684#M152</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;in python that means None was returned&amp;nbsp;&lt;/P&gt;&lt;P&gt;arguments but 1 was given&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt; a = None&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt; type(a)&lt;BR /&gt;&amp;lt;class 'NoneType'&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any function the 'gets' something or is designed just to run, required parameters or no parameters.&lt;/P&gt;&lt;P&gt;You specified portal.search_users('') .... have you tried portal.search_users() &amp;nbsp;... ie empty braces to see if the defaults will be used if nothing is specified? &amp;nbsp;Or perhaps it requires some other wildcard. &amp;nbsp;Your request uses double single-quotes as the default parameter, something that I doubt it requires.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Sep 2016 01:18:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-portal-questions/getting-error-while-searching-for-portal-users-in/m-p/11684#M152</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-09-05T01:18:12Z</dc:date>
    </item>
    <item>
      <title>Re: Getting error while searching for portal users in PortalPy</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-portal-questions/getting-error-while-searching-for-portal-users-in/m-p/11685#M153</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dan, I think portalpy uses 'get' when accessing the users within portal. It is failing during its own search. But if I place a specific search funtion it works (but only returns a sub-set of the users). &amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;portal.search_users('') is used as a query term is required for search_users and the wildcards '*' and '?' do not work.&amp;nbsp;&lt;SPAN&gt;portal.search_users() is invalid as there is no query.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Sep 2016 01:34:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-portal-questions/getting-error-while-searching-for-portal-users-in/m-p/11685#M153</guid>
      <dc:creator>GregStevenson</dc:creator>
      <dc:date>2016-09-05T01:34:06Z</dc:date>
    </item>
    <item>
      <title>Re: Getting error while searching for portal users in PortalPy</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-portal-questions/getting-error-while-searching-for-portal-users-in/m-p/11686#M154</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok ... just checking, I am suprised that there is no 'all' or 'any', like '*' use in arcpy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Sep 2016 01:41:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-portal-questions/getting-error-while-searching-for-portal-users-in/m-p/11686#M154</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-09-05T01:41:33Z</dc:date>
    </item>
    <item>
      <title>Re: Getting error while searching for portal users in PortalPy</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-portal-questions/getting-error-while-searching-for-portal-users-in/m-p/11687#M155</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The documentation around what to place as the query is very poor. Although I don't think this is the problem. I have an identical script pointing to a different portal and it works fine.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Sep 2016 01:43:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-portal-questions/getting-error-while-searching-for-portal-users-in/m-p/11687#M155</guid>
      <dc:creator>GregStevenson</dc:creator>
      <dc:date>2016-09-05T01:43:47Z</dc:date>
    </item>
    <item>
      <title>Re: Getting error while searching for portal users in PortalPy</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-portal-questions/getting-error-while-searching-for-portal-users-in/m-p/11688#M156</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Given that this works on other Portals, it seems the issue is more with the Portal than the query?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But just in case,&lt;/P&gt;&lt;P&gt;maybe this will help (from: https://github.com/Esri/portalpy/blob/master/portalpy.py) :&lt;/P&gt;&lt;P&gt;    Def search_users(self, q, sort_field='username', sort_order='asc', max_users=1000, add_org=True):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        """ Searches portal users.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        This gives you a list of users and some basic information&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        about those users.  To get more detailed information (such as role), you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        may need to call get_user on each user.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        .. note::&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;            A few things that will be helpful to know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;            1. The query syntax has quite a few features that can't&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;               be adequately described here.  The query syntax is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;               available in ArcGIS help.  A short version of that URL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;               is http://bitly.com/1fJ8q31.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;            2. Most of the time when searching groups you want to&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;               search within your organization in ArcGIS Online&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;               or within your Portal.  As a convenience, the method&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;               automatically appends your organization id to the query by&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;               default.  If you don't want the API to append to your query&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;               set add_org to false.  If you use this feature with an&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;               OR clause such as field=x or field=y you should put this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;               into parenthesis when using add_org.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        ================  ========================================================&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        *&lt;STRONG&gt;Argument&lt;/STRONG&gt;*      *&lt;STRONG&gt;Description&lt;/STRONG&gt;*&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Sep 2016 03:20:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-portal-questions/getting-error-while-searching-for-portal-users-in/m-p/11688#M156</guid>
      <dc:creator>PaulDavidson1</dc:creator>
      <dc:date>2016-09-05T03:20:19Z</dc:date>
    </item>
    <item>
      <title>Re: Getting error while searching for portal users in PortalPy</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-portal-questions/getting-error-while-searching-for-portal-users-in/m-p/11689#M157</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes I'm thinking that the issue is with the portal. But there are no problems anywhere else with the users (searching for specific users works fine). Previously ESRI has added users to the portal (esri_nav for example), i'm wondering if they've done something similar again that portalpy can't handle.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Sep 2016 03:31:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-portal-questions/getting-error-while-searching-for-portal-users-in/m-p/11689#M157</guid>
      <dc:creator>GregStevenson</dc:creator>
      <dc:date>2016-09-05T03:31:49Z</dc:date>
    </item>
    <item>
      <title>Re: Getting error while searching for portal users in PortalPy</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-portal-questions/getting-error-while-searching-for-portal-users-in/m-p/11690#M158</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have embarrassingly solved my own problem. The problem was that the portal password was incorrect. This doesn't explain the error messages though, nor does it explain how I was able to access some of the portal users details despite having an invalid login.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help to those who replied.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Sep 2016 02:39:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-portal-questions/getting-error-while-searching-for-portal-users-in/m-p/11690#M158</guid>
      <dc:creator>GregStevenson</dc:creator>
      <dc:date>2016-09-06T02:39:48Z</dc:date>
    </item>
    <item>
      <title>Re: Getting error while searching for portal users in PortalPy</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-portal-questions/getting-error-while-searching-for-portal-users-in/m-p/11691#M159</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for posting that back Greg.&lt;/P&gt;&lt;P&gt;That is some “interesting” stuff.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Makes no sense that you could obtain any info without a proper password.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I’m assuming all the users you did get responses for were “named users?”&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Sep 2016 04:20:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-portal-questions/getting-error-while-searching-for-portal-users-in/m-p/11691#M159</guid>
      <dc:creator>PaulDavidson1</dc:creator>
      <dc:date>2016-09-06T04:20:29Z</dc:date>
    </item>
    <item>
      <title>Re: Getting error while searching for portal users in PortalPy</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-portal-questions/getting-error-while-searching-for-portal-users-in/m-p/11692#M160</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, so i've just tested it again. With an incorrect password you can get responses for named users. But you cannot get responses for "all" named users (using '' as your query). But if you put in a search query such as 'greg' it will return all named users found.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Sep 2016 04:44:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-portal-questions/getting-error-while-searching-for-portal-users-in/m-p/11692#M160</guid>
      <dc:creator>GregStevenson</dc:creator>
      <dc:date>2016-09-06T04:44:48Z</dc:date>
    </item>
    <item>
      <title>Re: Getting error while searching for portal users in PortalPy</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-portal-questions/getting-error-while-searching-for-portal-users-in/m-p/11693#M161</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The request for users that it makes is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://webgis.esri.com/portal/sharing/rest/community/users?q=accountid%3A0123456789ABCDEF&amp;amp;sortField=&amp;amp;sortOrder=" title="http://webgis.esri.com/portal/sharing/rest/community/users?q=accountid%3A0123456789ABCDEF&amp;amp;sortField=&amp;amp;sortOrder="&gt;&amp;lt;portalUrl&amp;gt;/sharing/rest/community/users?q=accountid%3A0123456789ABCDEF&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The user search endpoint, (sharing/rest/community/users) does not need a token, so it doesn't actually use the credentials provided to generate a token. &amp;nbsp;It returns very basic information about the users within the organization. &amp;nbsp;If you were to make that request with a token, you'd get more information.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Sep 2016 23:05:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-portal-questions/getting-error-while-searching-for-portal-users-in/m-p/11693#M161</guid>
      <dc:creator>JonathanQuinn</dc:creator>
      <dc:date>2016-09-07T23:05:31Z</dc:date>
    </item>
    <item>
      <title>Re: Getting error while searching for portal users in PortalPy</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-portal-questions/getting-error-while-searching-for-portal-users-in/m-p/11694#M162</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the clarification Jonathan.&lt;/P&gt;&lt;P&gt;I'm wondering if this represents a minor security breach?&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, I can get to the query page without any login, which matches your clarification.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But then I can do a query on 'd*' and get back names with a d in them.&lt;/P&gt;&lt;P&gt;Since Portal is typically inside the firewall, maybe it's no big deal.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the design purpose of the sharing directory?&lt;/P&gt;&lt;P&gt;Thanks...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Sep 2016 01:20:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-portal-questions/getting-error-while-searching-for-portal-users-in/m-p/11694#M162</guid>
      <dc:creator>PaulDavidson1</dc:creator>
      <dc:date>2016-09-09T01:20:34Z</dc:date>
    </item>
  </channel>
</rss>

