<?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: 'GIS' object has no attribute 'admin' while logged in as an admin in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/gis-object-has-no-attribute-admin-while-logged-in/m-p/1219899#M7878</link>
    <description>&lt;P&gt;Version is 2.0.1 and that last argument gave me the same error AttributeError: 'GIS' object has no attribute 'admin'&lt;/P&gt;&lt;P&gt;really strange.&lt;/P&gt;</description>
    <pubDate>Fri, 07 Oct 2022 15:33:48 GMT</pubDate>
    <dc:creator>tslack</dc:creator>
    <dc:date>2022-10-07T15:33:48Z</dc:date>
    <item>
      <title>'GIS' object has no attribute 'admin' while logged in as an admin</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/gis-object-has-no-attribute-admin-while-logged-in/m-p/1219627#M7870</link>
      <description>&lt;P&gt;Hey there,&lt;/P&gt;&lt;P&gt;I am trying to get a python script working that stops all the services following this&lt;/P&gt;&lt;P&gt;&lt;A href="https://support.esri.com/en/technical-article/000019994" target="_blank" rel="noopener"&gt;https://support.esri.com/en/technical-article/000019994&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I get the general idea but I am getting the error 'GIS' object has no attribute 'admin' when trying to access the servers list. We use Enterprise Logins via SAML with One identity provider.&lt;/P&gt;&lt;P&gt;I am running this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from arcgis.gis import GIS
import arcgis.gis.admin

gis = GIS("https://url.domain.ca/portal")
print("Logged in as: " + gis.properties.user.username)
print("Servers: " + gis.admin.servers.list())&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Which gives me:&lt;/P&gt;&lt;P&gt;Logged in as: &lt;A href="mailto:TSlack@CITY" target="_blank" rel="noopener"&gt;TSlack@CITY&lt;/A&gt;&lt;BR /&gt;Traceback (most recent call last):&lt;BR /&gt;File "&amp;lt;string&amp;gt;", line 6, in &amp;lt;module&amp;gt;&lt;BR /&gt;AttributeError: 'GIS' object has no attribute 'admin'&lt;/P&gt;&lt;P&gt;If I run&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;print("Logged in as: " + gis.properties.user.role)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;it tells me im an org_admin which is correct, my user account as administrator privileges.&lt;/P&gt;&lt;P&gt;Any idea where I am going wrong here? Im using the latest ArcGIS Pro version with all updates. My python version output is below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import sys
import matplotlib
import numpy
import scipy
print(sys.version)
print(matplotlib.__version__)
print(numpy.__version__)
print(scipy.__version__)
3.9.11 [MSC v.1931 64 bit (AMD64)]
3.4.3
1.20.1
1.6.2&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;arcgis API is version 2.0.1&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2022 21:57:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/gis-object-has-no-attribute-admin-while-logged-in/m-p/1219627#M7870</guid>
      <dc:creator>tslack</dc:creator>
      <dc:date>2022-10-06T21:57:46Z</dc:date>
    </item>
    <item>
      <title>Re: 'GIS' object has no attribute 'admin' while logged in as an admin</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/gis-object-has-no-attribute-admin-while-logged-in/m-p/1219637#M7871</link>
      <description>&lt;P&gt;I don't have experience with SAML or One, but the code linked in your example worked for me (where I specify user name and password in the GIS constructor).&amp;nbsp; It reports that I, too, am an org_admin.&amp;nbsp; Do you get a result for the following line of code, or does it just throw an exception?&lt;/P&gt;&lt;LI-CODE lang="python"&gt;print(type(gis.admin))
# Mine shows &amp;lt;class 'arcgis.gis.admin.portaladmin.PortalAdminManager'&amp;gt;&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 06 Oct 2022 21:59:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/gis-object-has-no-attribute-admin-while-logged-in/m-p/1219637#M7871</guid>
      <dc:creator>RogerDunnGIS</dc:creator>
      <dc:date>2022-10-06T21:59:02Z</dc:date>
    </item>
    <item>
      <title>Re: 'GIS' object has no attribute 'admin' while logged in as an admin</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/gis-object-has-no-attribute-admin-while-logged-in/m-p/1219649#M7872</link>
      <description>&lt;P&gt;Hey &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/560410"&gt;@RogerDunnGIS&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Same result.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;print(type(gis.admin))
Traceback (most recent call last):
  File "&amp;lt;string&amp;gt;", line 6, in &amp;lt;module&amp;gt;
AttributeError: 'GIS' object has no attribute 'admin'&lt;/LI-CODE&gt;&lt;P&gt;Problem with SAML/One sign is that I think it prevents me from logging in with a user account I create thats not part of the enterprise so I can't test it with a non SAML account?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2022 22:42:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/gis-object-has-no-attribute-admin-while-logged-in/m-p/1219649#M7872</guid>
      <dc:creator>tslack</dc:creator>
      <dc:date>2022-10-06T22:42:09Z</dc:date>
    </item>
    <item>
      <title>Re: 'GIS' object has no attribute 'admin' while logged in as an admin</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/gis-object-has-no-attribute-admin-while-logged-in/m-p/1219650#M7873</link>
      <description>&lt;P&gt;In a web browser, are you able to navigate to the following URL (using your example)?:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;https://url.domain.ca/portal/portaladmin&lt;/LI-CODE&gt;&lt;P&gt;Also, if and when Python does end up resolving gis.admin, your last print statement won't work.&amp;nbsp; You can't concatenate (+) a string ("Servers:") with a list (gis.admin.servers.list()).&amp;nbsp; Rather you may want to write&lt;/P&gt;&lt;LI-CODE lang="python"&gt;print("Servers:")
for server in gis.admin.servers.list():
    print(server.name)&lt;/LI-CODE&gt;&lt;P&gt;or something like that.&amp;nbsp; I can't remember if name is a property or not.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2022 22:37:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/gis-object-has-no-attribute-admin-while-logged-in/m-p/1219650#M7873</guid>
      <dc:creator>RogerDunnGIS</dc:creator>
      <dc:date>2022-10-06T22:37:14Z</dc:date>
    </item>
    <item>
      <title>Re: 'GIS' object has no attribute 'admin' while logged in as an admin</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/gis-object-has-no-attribute-admin-while-logged-in/m-p/1219657#M7874</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/560410"&gt;@RogerDunnGIS&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://url.domain.ca/portal/portaladmin" target="_blank"&gt;https://url.domain.ca/portal/portaladmin&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Resolves fine and I am automatically logged in as my account.&lt;/P&gt;&lt;P&gt;Thanks for the correction on the python there, I still get the exception returned unfortunately.&lt;/P&gt;&lt;P&gt;AttributeError: 'GIS' object has no attribute 'admin'&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2022 22:47:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/gis-object-has-no-attribute-admin-while-logged-in/m-p/1219657#M7874</guid>
      <dc:creator>tslack</dc:creator>
      <dc:date>2022-10-06T22:47:20Z</dc:date>
    </item>
    <item>
      <title>Re: 'GIS' object has no attribute 'admin' while logged in as an admin</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/gis-object-has-no-attribute-admin-while-logged-in/m-p/1219856#M7877</link>
      <description>&lt;P&gt;This is a long shot, but the admin module introduced at 1.2.&amp;nbsp; What version of arcgis are you using?&lt;/P&gt;&lt;LI-CODE lang="python"&gt;print(arcgis.__version__)&lt;/LI-CODE&gt;&lt;P&gt;The server doesn't have a .name attribute, but you can call the str() on it:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;print("Servers: " + (', '.join([str(srv) for srv in gis.admin.servers.list()])))&lt;/LI-CODE&gt;&lt;P&gt;which puts out a list like:&lt;/P&gt;&lt;P&gt;Servers: &amp;lt;Server at &lt;A href="https://site.domain.com:6443/arcgis/admin" target="_blank"&gt;https://site.domain.com:6443/arcgis/admin&lt;/A&gt;&amp;gt;, &amp;lt;Server at &lt;A href="https://site.domain.biz/citygis/admin" target="_blank"&gt;https://site.domain.biz/citygis/admin&lt;/A&gt;&amp;gt;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Oct 2022 14:16:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/gis-object-has-no-attribute-admin-while-logged-in/m-p/1219856#M7877</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2022-10-07T14:16:49Z</dc:date>
    </item>
    <item>
      <title>Re: 'GIS' object has no attribute 'admin' while logged in as an admin</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/gis-object-has-no-attribute-admin-while-logged-in/m-p/1219899#M7878</link>
      <description>&lt;P&gt;Version is 2.0.1 and that last argument gave me the same error AttributeError: 'GIS' object has no attribute 'admin'&lt;/P&gt;&lt;P&gt;really strange.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Oct 2022 15:33:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/gis-object-has-no-attribute-admin-while-logged-in/m-p/1219899#M7878</guid>
      <dc:creator>tslack</dc:creator>
      <dc:date>2022-10-07T15:33:48Z</dc:date>
    </item>
    <item>
      <title>Re: 'GIS' object has no attribute 'admin' while logged in as an admin</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/gis-object-has-no-attribute-admin-while-logged-in/m-p/1219913#M7879</link>
      <description>&lt;P&gt;I hate to say it, but we community members can only do so much.&amp;nbsp; If you've got the latest version and you're on maintenance/subscription, you should probably contact technical support, who can help you for free.&amp;nbsp; They're good at what they do and might be able to solve your issue quicker than we can.&amp;nbsp; They can also set up screen sharing and what not.&amp;nbsp; They might be aware of some of the nuances of using the GIS object with SAML and One identity.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Oct 2022 15:50:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/gis-object-has-no-attribute-admin-while-logged-in/m-p/1219913#M7879</guid>
      <dc:creator>RogerDunnGIS</dc:creator>
      <dc:date>2022-10-07T15:50:41Z</dc:date>
    </item>
    <item>
      <title>Re: 'GIS' object has no attribute 'admin' while logged in as an admin</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/gis-object-has-no-attribute-admin-while-logged-in/m-p/1219920#M7880</link>
      <description>&lt;P&gt;Appreciate the help. I guess I'll do just that. I'll try to remember to update the thread with a result.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Oct 2022 15:57:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/gis-object-has-no-attribute-admin-while-logged-in/m-p/1219920#M7880</guid>
      <dc:creator>tslack</dc:creator>
      <dc:date>2022-10-07T15:57:20Z</dc:date>
    </item>
    <item>
      <title>Re: 'GIS' object has no attribute 'admin' while logged in as an admin</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/gis-object-has-no-attribute-admin-while-logged-in/m-p/1219948#M7881</link>
      <description>&lt;P&gt;Yeah, it will throw the error if .admin isn't found in the GIS module.&amp;nbsp; We stop/start ours a little differently using the admin server connection if you are interested.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Oct 2022 16:37:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/gis-object-has-no-attribute-admin-while-logged-in/m-p/1219948#M7881</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2022-10-07T16:37:03Z</dc:date>
    </item>
    <item>
      <title>Re: 'GIS' object has no attribute 'admin' while logged in as an admin</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/gis-object-has-no-attribute-admin-while-logged-in/m-p/1230032#M7983</link>
      <description>&lt;P&gt;Were you able to resolve this with Esri Support?&amp;nbsp; If so, what was the outcome?&lt;/P&gt;</description>
      <pubDate>Wed, 09 Nov 2022 16:20:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/gis-object-has-no-attribute-admin-while-logged-in/m-p/1230032#M7983</guid>
      <dc:creator>RogerDunnGIS</dc:creator>
      <dc:date>2022-11-09T16:20:49Z</dc:date>
    </item>
    <item>
      <title>Re: 'GIS' object has no attribute 'admin' while logged in as an admin</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/gis-object-has-no-attribute-admin-while-logged-in/m-p/1234907#M8054</link>
      <description>&lt;P&gt;The issue had to do with the fact our Enterprise is running 10.6&lt;/P&gt;&lt;P&gt;ESRI Support said "Our 10.6.1 Enterprise deployment built with&amp;nbsp;SAML isn't maintained very well anymore as the product is in mature support. I've tried to bring it back to life but the IDP it leverages no longer exists, and I've been unable to create a new one to test this."&lt;/P&gt;&lt;P&gt;My main goal was getting a script to run that stopped services on Server and I was given a link to &lt;A href="https://protect-ca.mimecast.com/s/c2pQC2xZ0mIk5Apin58xm?domain=enterprise.arcgis.com" target="_blank"&gt;https://enterprise.arcgis.com/en/server/10.7/develop/windows/example-stop-or-start-all-services-in-a-folder.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;which I was able to modify for my purposes.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Nov 2022 17:43:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/gis-object-has-no-attribute-admin-while-logged-in/m-p/1234907#M8054</guid>
      <dc:creator>tslack</dc:creator>
      <dc:date>2022-11-24T17:43:00Z</dc:date>
    </item>
  </channel>
</rss>

