<?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 How to do portal identity delegation from JS into Python in Developers Questions</title>
    <link>https://community.esri.com/t5/developers-questions/how-to-do-portal-identity-delegation-from-js-into/m-p/676472#M4646</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a JS app that does a user login into AGOL (OAuth). If successful I want to call a python script that leverages Esri's ArcGIS Python API and manipulates content in the AGOL account. &amp;nbsp;Problem is that the python is out of context so it needs to authenticate to AGOL too. I obviously don't want another login page and especially not a custom one, so how would I pass that security context over to the python code?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One approach I thought should have worked was in JS to grab the access token and then use that in the Python script. Problem is that the GIS class does not take a token as an argument:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;class arcgis.gis.GIS(url=None, username=None, password=None, key_file=None, cert_file=None, verify_cert=True, set_active=True)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas how this might be accomplished?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 Jun 2017 22:57:44 GMT</pubDate>
    <dc:creator>JonUjkani</dc:creator>
    <dc:date>2017-06-20T22:57:44Z</dc:date>
    <item>
      <title>How to do portal identity delegation from JS into Python</title>
      <link>https://community.esri.com/t5/developers-questions/how-to-do-portal-identity-delegation-from-js-into/m-p/676472#M4646</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a JS app that does a user login into AGOL (OAuth). If successful I want to call a python script that leverages Esri's ArcGIS Python API and manipulates content in the AGOL account. &amp;nbsp;Problem is that the python is out of context so it needs to authenticate to AGOL too. I obviously don't want another login page and especially not a custom one, so how would I pass that security context over to the python code?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One approach I thought should have worked was in JS to grab the access token and then use that in the Python script. Problem is that the GIS class does not take a token as an argument:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;class arcgis.gis.GIS(url=None, username=None, password=None, key_file=None, cert_file=None, verify_cert=True, set_active=True)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas how this might be accomplished?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jun 2017 22:57:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/how-to-do-portal-identity-delegation-from-js-into/m-p/676472#M4646</guid>
      <dc:creator>JonUjkani</dc:creator>
      <dc:date>2017-06-20T22:57:44Z</dc:date>
    </item>
  </channel>
</rss>

