<?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: python API fails with IWA for federated ArcGIS servers in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/python-api-fails-with-iwa-for-federated-arcgis/m-p/853951#M3951</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;BUG-000116560 Python API bug was created for this issue.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 Sep 2018 05:24:32 GMT</pubDate>
    <dc:creator>DamianSlee2</dc:creator>
    <dc:date>2018-09-05T05:24:32Z</dc:date>
    <item>
      <title>python API fails with IWA for federated ArcGIS servers</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/python-api-fails-with-iwa-for-federated-arcgis/m-p/853947#M3947</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Have found that when using python API with IWA&amp;nbsp;enabled Portal,&amp;nbsp; the python API works fine with Portal operations, but fails on Server requests due to an issue with generate_token().&amp;nbsp; &amp;nbsp; a POST request is being sent with &amp;amp;token=None, which is rejected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;REQUEST: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fmyportalserver%2Fportal%2Fsharing%2Frest%2FgenerateToken" rel="nofollow" target="_blank"&gt;https://myportalserver/portal/sharing/rest/generateToken&lt;/A&gt;&lt;SPAN&gt;, {'serverURL': '&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fmyfederatedarcgiserver%2Farcgis%2Fadmin" rel="nofollow" target="_blank"&gt;https://myfederatedarcgiserver/arcgis/admin&lt;/A&gt;&lt;SPAN&gt;', 'token': None, 'expiration': '1440', 'f': 'json', 'request': 'getToken', 'referer': 'http'}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;RESPONSE: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fmyportalserver%2Fportal%2Fsharing%2Frest%2FgenerateToken" rel="nofollow" target="_blank"&gt;https://myportalserver/portal/sharing/rest/generateToken&lt;/A&gt;&lt;SPAN&gt;, {"error":{"code":400,"message":"Unable to generate token.","details":["Unable to generate token for this server"]}}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;eg&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;gis = GIS("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fmyportalserver%2Fportal" rel="nofollow" target="_blank"&gt;https://myportalserver/portal&lt;/A&gt;&lt;SPAN&gt;")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;print("Logged in as: " + gis.properties.user.username)&lt;/P&gt;&lt;P&gt;#this fails&lt;/P&gt;&lt;P&gt;gis_servers = gis.admin.servers.list()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;python api 1.5.0&amp;nbsp;&lt;/P&gt;&lt;P&gt;Python 3.6.4 with arcgis pip installed from pypi.org&lt;/P&gt;&lt;P&gt;Portal 10.5.1&lt;/P&gt;&lt;P&gt;ArcGIS server 10.5.1 federated with portal&lt;/P&gt;&lt;P&gt;IIS web adapter /portal&amp;nbsp; &amp;nbsp;(Windows authentication enabled, anonymous disabled)&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;IIS web adapter /arcgis&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;(Anonymous enabled)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;Damian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Aug 2018 03:35:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/python-api-fails-with-iwa-for-federated-arcgis/m-p/853947#M3947</guid>
      <dc:creator>DamianSlee2</dc:creator>
      <dc:date>2018-08-30T03:35:09Z</dc:date>
    </item>
    <item>
      <title>Re: python API fails with IWA for federated ArcGIS servers</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/python-api-fails-with-iwa-for-federated-arcgis/m-p/853948#M3948</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;According to my understanding, If you are using IWA authentication, you will be using so called Web-tier authentication, and this is an alternative authentication method to token-based ArcGIS Server authentication.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Simply put, in your case there are no token involved in authentication. That's why you can connect to your GIS but you can't get token using the following property.&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;gis._con.token&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway, I am no expert on Portal security, please read the following document --- I could be very wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://enterprise.arcgis.com/en/server/latest/administer/windows/configuring-arcgis-server-s-authentication-tier.htm" title="http://enterprise.arcgis.com/en/server/latest/administer/windows/configuring-arcgis-server-s-authentication-tier.htm"&gt;Configuring ArcGIS Server's authentication tier—ArcGIS Server Administration (Windows) | ArcGIS Enterprise&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The reason you can't list the federated servers could be that the server settings&amp;nbsp;don't permit admin operations through web adapter, you can talk to the administrator to confirm this. You should be able to work on the content though.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Aug 2018 05:44:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/python-api-fails-with-iwa-for-federated-arcgis/m-p/853948#M3948</guid>
      <dc:creator>simoxu</dc:creator>
      <dc:date>2018-08-30T05:44:23Z</dc:date>
    </item>
    <item>
      <title>Re: python API fails with IWA for federated ArcGIS servers</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/python-api-fails-with-iwa-for-federated-arcgis/m-p/853949#M3949</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the use case is Valid.&lt;/P&gt;&lt;P&gt;the Portal and Server installation is valid.&amp;nbsp; WebAdapter install is valid and allowing admin requests.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the issue is that a "None" token argument is being sent to the portal REST API /generateToken.&amp;nbsp; &amp;nbsp;It is a invalid request that does not conform to the Portal /generateToken REST API specification.&amp;nbsp; &amp;nbsp;The error response is correct, it makes no sense to send a token arguement to generateToken, let alone "None".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have test it in fiddler, removing &amp;amp;token=None,&amp;nbsp; and the request then succeeds.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Aug 2018 05:51:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/python-api-fails-with-iwa-for-federated-arcgis/m-p/853949#M3949</guid>
      <dc:creator>DamianSlee2</dc:creator>
      <dc:date>2018-08-30T05:51:24Z</dc:date>
    </item>
    <item>
      <title>Re: python API fails with IWA for federated ArcGIS servers</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/python-api-fails-with-iwa-for-federated-arcgis/m-p/853950#M3950</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I agree token should not be used in your case which is IWA authentication.&lt;/P&gt;&lt;P&gt;If Python API generated that REST request, then it seems a small bug of the API itself. I'd suggest you contact ESRI support to confirm it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Aug 2018 23:56:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/python-api-fails-with-iwa-for-federated-arcgis/m-p/853950#M3950</guid>
      <dc:creator>simoxu</dc:creator>
      <dc:date>2018-08-30T23:56:42Z</dc:date>
    </item>
    <item>
      <title>Re: python API fails with IWA for federated ArcGIS servers</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/python-api-fails-with-iwa-for-federated-arcgis/m-p/853951#M3951</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;BUG-000116560 Python API bug was created for this issue.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Sep 2018 05:24:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/python-api-fails-with-iwa-for-federated-arcgis/m-p/853951#M3951</guid>
      <dc:creator>DamianSlee2</dc:creator>
      <dc:date>2018-09-05T05:24:32Z</dc:date>
    </item>
  </channel>
</rss>

