<?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: Is it possible to use the ArcGIS Online Python API if my organziation is using a federated login? in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/is-it-possible-to-use-the-arcgis-online-python-api/m-p/862411#M4238</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #000000; background-color: #ffffff; margin: 1em 0px 0px;"&gt;The ArcGIS API for Python acts as a 'serverless native application' when using OAuth 2.0 authorization with ArcGIS.&lt;/P&gt;&lt;P style="color: #000000; background-color: #ffffff; margin: 1em 0px 0px;"&gt;To be able to log in using OAuth 2.0, you need to follow the workflow described below:&lt;/P&gt;&lt;P style="color: #000000; background-color: #ffffff; margin: 1em 0px 0px;"&gt;&lt;/P&gt;&lt;UL style="color: #000000; background-color: #ffffff; margin-bottom: 9px; padding-left: 2em;"&gt;&lt;LI&gt;Log into your web GIS (ArcGIS Online organization or ArcGIS Enterprise)&lt;/LI&gt;&lt;LI&gt;Go to Content tab&lt;/LI&gt;&lt;LI&gt;Click '+ Add Item &amp;gt; An Application' menu&lt;/LI&gt;&lt;LI&gt;Add an application:&lt;UL style="padding-left: 2em;"&gt;&lt;LI&gt;Type: Application&lt;/LI&gt;&lt;LI&gt;Title: Python&lt;/LI&gt;&lt;LI&gt;Tags: python&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;On the Item details page of this newly created application, navigate to Settings tab&lt;/LI&gt;&lt;LI&gt;Click the Registered Info button. It's towards the bottom of the page.&lt;/LI&gt;&lt;LI&gt;This will show an App ID. This is your client id and needs to be passed in as the client_id parameter when construcing a GIS object. You need this in your Python code to log in&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example code:&lt;/P&gt;&lt;P&gt;test_client_id = 'OGz1I2eoO8dO0ii2'&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%2Fdeldev.maps.arcgis.com" rel="nofollow" target="_blank"&gt;https://deldev.maps.arcgis.com&lt;/A&gt;&lt;SPAN&gt;', client_id=test_client_id)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;gis.users.me&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If your configured identity provider is compatible, you can even pass in your login credentials for a non-interactive login workflow:&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%2Fdeldev.maps.arcgis.com" rel="nofollow" target="_blank"&gt;https://deldev.maps.arcgis.com&lt;/A&gt;&lt;SPAN&gt;', 'your-username', 'your-password', client_id=test_client_id)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(Additional info: This is using "Mobile and Native Named User Login" workflow described at&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://developers.arcgis.com/documentation/core-concepts/security-and-authentication/mobile-and-native-user-logins/" style="color: #337ab7; background-color: transparent; text-decoration: underline;" target="_blank"&gt;https://developers.arcgis.com/documentation/core-concepts/security-and-authentication/mobile-and-native-user-logins/&lt;/A&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 21 Jul 2017 23:04:49 GMT</pubDate>
    <dc:creator>RohitSingh2</dc:creator>
    <dc:date>2017-07-21T23:04:49Z</dc:date>
    <item>
      <title>Is it possible to use the ArcGIS Online Python API if my organziation is using a federated login?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/is-it-possible-to-use-the-arcgis-online-python-api/m-p/862406#M4233</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My company has a federated single sign on with ArcGIS Online, and I'm unable to authenticate with AGOL and the Python API. &lt;/P&gt;&lt;PRE class="language-python line-numbers"&gt;&lt;CODE&gt;gis &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; GIS&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;agolUrl&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; userName&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; password&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This line will throw an exception, "Unable to generate token.&amp;nbsp; Invalid username or password."&amp;nbsp; The values for "userName" and "password" are my normal AGOL logins - these will work when logging into the AGOL homepage in my browser.&amp;nbsp; I'm able to log in using my personal account (this one), and query content with the GIS() module.&amp;nbsp; How do I authenticate via the Python API using my account that is a federated login from my company?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Jul 2017 17:08:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/is-it-possible-to-use-the-arcgis-online-python-api/m-p/862406#M4233</guid>
      <dc:creator>mfcallahan</dc:creator>
      <dc:date>2017-07-14T17:08:16Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to use the ArcGIS Online Python API if my organziation is using a federated login?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/is-it-possible-to-use-the-arcgis-online-python-api/m-p/862407#M4234</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;After speaking with Esri tech support, they informed me that &lt;SPAN style="font-size: 11.0pt;"&gt;enterprise logins for ArcGIS Online are not currently supported by the Python API.&amp;nbsp; No timeline was given for implementation of this feature, but I was informed there is an enhancement request open.&amp;nbsp; I will leave this post here for future reference for anybody else with the same inquiry.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Jul 2017 20:43:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/is-it-possible-to-use-the-arcgis-online-python-api/m-p/862407#M4234</guid>
      <dc:creator>mfcallahan</dc:creator>
      <dc:date>2017-07-14T20:43:13Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to use the ArcGIS Online Python API if my organziation is using a federated login?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/is-it-possible-to-use-the-arcgis-online-python-api/m-p/862408#M4235</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Enterprise logins (and all types of logins) are supported in the version that went out last week (v1.2). For OAUTH/SAML, you need to pass in the URL and the client_id parameter in the GIS constructor.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Jul 2017 20:57:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/is-it-possible-to-use-the-arcgis-online-python-api/m-p/862408#M4235</guid>
      <dc:creator>RohitSingh2</dc:creator>
      <dc:date>2017-07-14T20:57:39Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to use the ArcGIS Online Python API if my organziation is using a federated login?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/is-it-possible-to-use-the-arcgis-online-python-api/m-p/862409#M4236</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you have any additional information?&amp;nbsp; The tech support person I spoke with made no mention of this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Jul 2017 22:06:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/is-it-possible-to-use-the-arcgis-online-python-api/m-p/862409#M4236</guid>
      <dc:creator>mfcallahan</dc:creator>
      <dc:date>2017-07-14T22:06:56Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to use the ArcGIS Online Python API if my organziation is using a federated login?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/is-it-possible-to-use-the-arcgis-online-python-api/m-p/862410#M4237</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We will update the guide page&amp;nbsp;&lt;A href="https://developers.arcgis.com/python/guide/working-with-different-authentication-schemes/"&gt;Working with different auth systems&lt;/A&gt;&amp;nbsp;with instructions and put a note here when it goes live.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Jul 2017 18:33:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/is-it-possible-to-use-the-arcgis-online-python-api/m-p/862410#M4237</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2017-07-17T18:33:42Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to use the ArcGIS Online Python API if my organziation is using a federated login?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/is-it-possible-to-use-the-arcgis-online-python-api/m-p/862411#M4238</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #000000; background-color: #ffffff; margin: 1em 0px 0px;"&gt;The ArcGIS API for Python acts as a 'serverless native application' when using OAuth 2.0 authorization with ArcGIS.&lt;/P&gt;&lt;P style="color: #000000; background-color: #ffffff; margin: 1em 0px 0px;"&gt;To be able to log in using OAuth 2.0, you need to follow the workflow described below:&lt;/P&gt;&lt;P style="color: #000000; background-color: #ffffff; margin: 1em 0px 0px;"&gt;&lt;/P&gt;&lt;UL style="color: #000000; background-color: #ffffff; margin-bottom: 9px; padding-left: 2em;"&gt;&lt;LI&gt;Log into your web GIS (ArcGIS Online organization or ArcGIS Enterprise)&lt;/LI&gt;&lt;LI&gt;Go to Content tab&lt;/LI&gt;&lt;LI&gt;Click '+ Add Item &amp;gt; An Application' menu&lt;/LI&gt;&lt;LI&gt;Add an application:&lt;UL style="padding-left: 2em;"&gt;&lt;LI&gt;Type: Application&lt;/LI&gt;&lt;LI&gt;Title: Python&lt;/LI&gt;&lt;LI&gt;Tags: python&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;On the Item details page of this newly created application, navigate to Settings tab&lt;/LI&gt;&lt;LI&gt;Click the Registered Info button. It's towards the bottom of the page.&lt;/LI&gt;&lt;LI&gt;This will show an App ID. This is your client id and needs to be passed in as the client_id parameter when construcing a GIS object. You need this in your Python code to log in&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example code:&lt;/P&gt;&lt;P&gt;test_client_id = 'OGz1I2eoO8dO0ii2'&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%2Fdeldev.maps.arcgis.com" rel="nofollow" target="_blank"&gt;https://deldev.maps.arcgis.com&lt;/A&gt;&lt;SPAN&gt;', client_id=test_client_id)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;gis.users.me&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If your configured identity provider is compatible, you can even pass in your login credentials for a non-interactive login workflow:&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%2Fdeldev.maps.arcgis.com" rel="nofollow" target="_blank"&gt;https://deldev.maps.arcgis.com&lt;/A&gt;&lt;SPAN&gt;', 'your-username', 'your-password', client_id=test_client_id)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(Additional info: This is using "Mobile and Native Named User Login" workflow described at&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://developers.arcgis.com/documentation/core-concepts/security-and-authentication/mobile-and-native-user-logins/" style="color: #337ab7; background-color: transparent; text-decoration: underline;" target="_blank"&gt;https://developers.arcgis.com/documentation/core-concepts/security-and-authentication/mobile-and-native-user-logins/&lt;/A&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jul 2017 23:04:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/is-it-possible-to-use-the-arcgis-online-python-api/m-p/862411#M4238</guid>
      <dc:creator>RohitSingh2</dc:creator>
      <dc:date>2017-07-21T23:04:49Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to use the ArcGIS Online Python API if my organziation is using a federated login?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/is-it-possible-to-use-the-arcgis-online-python-api/m-p/862412#M4239</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rohit,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for this. Got more question on the API. I want to try&amp;nbsp;the non-interactive scripting of connectivity to portal, so im following this sample, but populated with parameters relevant to my environment:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" style="color: #4c4c4c; background-color: #f7f7f7;"&gt;gis&lt;/SPAN&gt;&lt;SPAN style="color: #4c4c4c; background-color: #f7f7f7;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #666666; background-color: #f7f7f7;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #4c4c4c; background-color: #f7f7f7;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #4c4c4c; background-color: #f7f7f7;"&gt;GIS&lt;/SPAN&gt;&lt;SPAN class="" style="color: #4c4c4c; background-color: #f7f7f7;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #ba2121; background-color: #f7f7f7;"&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fpython.playground.esri.com%2Fportal" rel="nofollow" target="_blank"&gt;https://python.playground.esri.com/portal&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="" style="color: #4c4c4c; background-color: #f7f7f7;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #4c4c4c; background-color: #f7f7f7;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #4c4c4c; background-color: #f7f7f7;"&gt;username&lt;/SPAN&gt;&lt;SPAN class="" style="color: #666666; background-color: #f7f7f7;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="color: #ba2121; background-color: #f7f7f7;"&gt;"arcgis_python"&lt;/SPAN&gt;&lt;SPAN class="" style="color: #4c4c4c; background-color: #f7f7f7;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #4c4c4c; background-color: #f7f7f7;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #4c4c4c; background-color: #f7f7f7;"&gt;password&lt;/SPAN&gt;&lt;SPAN class="" style="color: #666666; background-color: #f7f7f7;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="color: #ba2121; background-color: #f7f7f7;"&gt;"amazing_arcgis_123"&lt;/SPAN&gt;&lt;SPAN class="" style="color: #4c4c4c; background-color: #f7f7f7;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #4c4c4c; background-color: #f7f7f7;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #4c4c4c; background-color: #f7f7f7;"&gt;client_id&lt;/SPAN&gt;&lt;SPAN class="" style="color: #666666; background-color: #f7f7f7;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="color: #ba2121; background-color: #f7f7f7;"&gt;'f8cRxbP3NO8bf9ag'&lt;/SPAN&gt;&lt;SPAN class="" style="color: #4c4c4c; background-color: #f7f7f7;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="color: #4c4c4c; background-color: #f7f7f7;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #008000; background-color: #f7f7f7;"&gt;print&lt;/SPAN&gt;&lt;SPAN class="" style="color: #4c4c4c; background-color: #f7f7f7;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #ba2121; background-color: #f7f7f7;"&gt;"Successfully logged in as: "&lt;/SPAN&gt;&lt;SPAN style="color: #4c4c4c; background-color: #f7f7f7;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #666666; background-color: #f7f7f7;"&gt;+&lt;/SPAN&gt;&lt;SPAN style="color: #4c4c4c; background-color: #f7f7f7;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #4c4c4c; background-color: #f7f7f7;"&gt;gis&lt;/SPAN&gt;&lt;SPAN class="" style="color: #666666; background-color: #f7f7f7;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="" style="color: #4c4c4c; background-color: #f7f7f7;"&gt;properties&lt;/SPAN&gt;&lt;SPAN class="" style="color: #666666; background-color: #f7f7f7;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="" style="color: #4c4c4c; background-color: #f7f7f7;"&gt;user&lt;/SPAN&gt;&lt;SPAN class="" style="color: #666666; background-color: #f7f7f7;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="" style="color: #4c4c4c; background-color: #f7f7f7;"&gt;username&lt;/SPAN&gt;&lt;SPAN class="" style="color: #4c4c4c; background-color: #f7f7f7;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This does not work right away as i suspect there might be issues with my IDP - i still am prompted to log in to my portal/IDP button needs to be clicked and i get the SAML code OK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What makes me wonder is the syntax of URL produced that i am supposed to follow:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;A href="https://&amp;lt;portalhost&amp;gt;.com/portal/sharing/rest/oauth2/authorize?user_orgkey=&amp;amp;"&gt;https://&amp;lt;portalhost&amp;gt;.com/portal/sharing/rest/oauth2/authorize?user_orgkey=&amp;amp;&lt;/A&gt;&lt;STRONG&gt;username&lt;/STRONG&gt;=MYUSER&amp;amp;&lt;STRONG&gt;password&lt;/STRONG&gt;=MYPASSINPLAINTEXT&amp;amp;&lt;STRONG&gt;oauth_state&lt;/STRONG&gt;=&amp;lt;SOMELONGCODE&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there documentation on syntax of this&amp;nbsp;&lt;A href="https://%3Cportalhost%3E.com/portal/sharing/rest/oauth2/authorize?user_orgkey=&amp;amp;" style="color: #2989c5; text-decoration: none;"&gt;rest/oauth2/authorize&lt;/A&gt; endpoint that would list all params it takes? I found this&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/rest/users-groups-and-items/authentication.htm" title="https://developers.arcgis.com/rest/users-groups-and-items/authentication.htm"&gt;Authentication—ArcGIS REST API: Users, groups, and content | ArcGIS for Developers&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but does not mention username or password etc&lt;/P&gt;&lt;P&gt;Would you know in particular how to allow username/pass enabling for OKTA (or is it comatible)?&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/410196_pastedImage_9.png" /&gt;&lt;/P&gt;&lt;P&gt;If not, what options to look for other IDPs so perhaps we could try to figure out OKTA please?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Szymon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 May 2018 12:47:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/is-it-possible-to-use-the-arcgis-online-python-api/m-p/862412#M4239</guid>
      <dc:creator>SzymonPiskula1</dc:creator>
      <dc:date>2018-05-30T12:47:58Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to use the ArcGIS Online Python API if my organziation is using a federated login?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/is-it-possible-to-use-the-arcgis-online-python-api/m-p/862413#M4240</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rohit,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I got a conflicting information from the Esri Tech support that Enterprise log-in is still in product plan today (current version is 1.4.2).&amp;nbsp; &amp;nbsp; This contradicts your comment that all types of log-in are supported at version 1.2.&amp;nbsp; Which is true?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jul 2018 18:11:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/is-it-possible-to-use-the-arcgis-online-python-api/m-p/862413#M4240</guid>
      <dc:creator>AhjungKim4</dc:creator>
      <dc:date>2018-07-11T18:11:14Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to use the ArcGIS Online Python API if my organziation is using a federated login?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/is-it-possible-to-use-the-arcgis-online-python-api/m-p/1019949#M5474</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/254682"&gt;@RohitSingh2&lt;/a&gt;&amp;nbsp;and&amp;nbsp;@Anonymous User,&lt;/P&gt;&lt;P&gt;I have a special use case right now and can't find a way to connect with the Python API. We intend to create daily adminstrative workflows with the API which would run as scheduled tasks.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's an Enterprise LogIn where the Active Directory is hosted in the Azure Cloud meaning that there is no domain name to enter like in the example for &lt;A href="https://developers.arcgis.com/python/guide/working-with-different-authentication-schemes/#Portal-tier-authentication-with-Active-Directory" target="_self"&gt;Portal-tier authentication with Active Directory&lt;/A&gt;. Additional in this architecture there is an ID Broker which takes care of the logging in to the AD meaning that a normal sign in to Portal produces an extra, non-esri window to choose which AD user to sign in with. I wonder how my Python script can know about or work around this step.&amp;nbsp;&lt;/P&gt;&lt;P&gt;We have considered using the OAuth2.0 App though IT is concerned about saftey issues if the Client Id falls into the wrong hands since it would give access to all the content and admin capabilities of the user it is registered under. Is there a recommended way to take care of this? Should all items be accessed using a token like in the last examles at the end of this &lt;A href="https://developers.arcgis.com/rest/users-groups-and-items/token.htm" target="_self"&gt;Rest API Documentation&lt;/A&gt;? Furthermore, using OAuth 2.0 with SAML opens the login window followed by "OAuth2 approval" where a code has to be actively copied and given in the CMD or Notebook - I can't see how we would do this in script that is run automatically.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just as additional information: when we sign in to ArcGIS Pro using the Enterprise user and then run gis=GIS("Pro"), the login is successful. Unfortunately we cannot count on opening Pro periodically to renew the token for the admin scripts in a production environment.&lt;/P&gt;&lt;P&gt;Would the ArcGIS Notebook Server be a possible solution to this issue? Can I run a daily task as an Enterprise user or even Built-In user with admin privileges? I haven't used it myself yet.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance and best regards!&lt;BR /&gt;Daniel&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jan 2021 08:50:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/is-it-possible-to-use-the-arcgis-online-python-api/m-p/1019949#M5474</guid>
      <dc:creator>DanielMast_DE</dc:creator>
      <dc:date>2021-01-26T08:50:03Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to use the ArcGIS Online Python API if my organziation is using a federated login?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/is-it-possible-to-use-the-arcgis-online-python-api/m-p/1045802#M5913</link>
      <description>&lt;P&gt;I ran into the same issue and found a solution using Python (using BeautifulSoup library) to automate the interactive log in page to ultimately generate a access a token.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Alternatively, ESRI recommends a non-interactive login which basically uses the built-in login to authenticate.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Apr 2021 02:01:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/is-it-possible-to-use-the-arcgis-online-python-api/m-p/1045802#M5913</guid>
      <dc:creator>WengNg2</dc:creator>
      <dc:date>2021-04-12T02:01:33Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to use the ArcGIS Online Python API if my organziation is using a federated login?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/is-it-possible-to-use-the-arcgis-online-python-api/m-p/1123604#M6883</link>
      <description>&lt;P&gt;Hey, interested in this very much, do you have code/process available for how you used Beautiful Soup to overcome this and generate a token. Did you then pass that token to the GIS() class?&lt;/P&gt;</description>
      <pubDate>Tue, 07 Dec 2021 21:21:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/is-it-possible-to-use-the-arcgis-online-python-api/m-p/1123604#M6883</guid>
      <dc:creator>CheckCheckov</dc:creator>
      <dc:date>2021-12-07T21:21:30Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to use the ArcGIS Online Python API if my organziation is using a federated login?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/is-it-possible-to-use-the-arcgis-online-python-api/m-p/1126167#M6908</link>
      <description>&lt;P&gt;Checkout this article : &lt;A href="https://www.prowestgis.com/there-and-back-again/" target="_self"&gt;https://www.prowestgis.com/there-and-back-again/.&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Yes, you pass the token generated to the GIS() class. However, there is small disadvantage that I found later on, the token expires after 30 minutes. Any API calls that last longer than 30 minutes will result in an error after the token expires. I haven't found a way around this issue yet but funnily enough, the API call will continue to execute and finish regardless of when your token expires.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Dec 2021 06:09:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/is-it-possible-to-use-the-arcgis-online-python-api/m-p/1126167#M6908</guid>
      <dc:creator>WengNg2</dc:creator>
      <dc:date>2021-12-15T06:09:47Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to use the ArcGIS Online Python API if my organziation is using a federated login?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/is-it-possible-to-use-the-arcgis-online-python-api/m-p/1135522#M7022</link>
      <description>&lt;P&gt;Wow, thank you for the reply 4 years later! Since then I've had a few different jobs, but I'm actually back at the same company, and have been tasked to again investigate this same thing! My manager inquired about how it would work with Active Directory, and I remembered that I had asked this question once upon a time.&amp;nbsp; Low and behold, there was an answer! I'm going to give this a try and will report back with my experience! Thanks again!&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jan 2022 17:44:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/is-it-possible-to-use-the-arcgis-online-python-api/m-p/1135522#M7022</guid>
      <dc:creator>mfcallahan</dc:creator>
      <dc:date>2022-01-20T17:44:09Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to use the ArcGIS Online Python API if my organziation is using a federated login?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/is-it-possible-to-use-the-arcgis-online-python-api/m-p/1139706#M7071</link>
      <description>&lt;P&gt;Thanks for sharing this approach! I'm faced with solving this as well. I've followed the article at the link you posted. I got it all working up until the section below, at which time I get an error that 'code' is not defined. I've been trying to follow the description of how this works to figure out what is missing, but some of it is beyond me. I wonder if you (or anyone) can tell me where the 'code' variable is defined?&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# Exchange the code for an access token
post_data = {
    'client_id': 'PUBLIC_CLIENT_ID',
    'code': code,
    'redirect_uri': 'urn:ietf:wg:oauth:2.0:oob',
    'grant_type': 'authorization_code'
}
 
url = 'https://' + ORGANIZATION_NAME + '.maps.arcgis.com/sharing/rest/oauth2/token'
 
response = requests.post(url, data = post_data)
token_response = json.loads(response.text)
access_token = token_response['access_token']&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Feb 2022 04:06:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/is-it-possible-to-use-the-arcgis-online-python-api/m-p/1139706#M7071</guid>
      <dc:creator>KarenM</dc:creator>
      <dc:date>2022-02-02T04:06:48Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to use the ArcGIS Online Python API if my organziation is using a federated login?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/is-it-possible-to-use-the-arcgis-online-python-api/m-p/1140670#M7082</link>
      <description>&lt;P&gt;The code variable refers to the authorization code returned when send a POST request to the IDP.&lt;/P&gt;&lt;P&gt;&amp;nbsp;It is returned by this line&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;response &lt;SPAN&gt;=&lt;/SPAN&gt; requests.&lt;SPAN&gt;post&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;oAuthInfo&lt;SPAN&gt;[&lt;/SPAN&gt;&lt;SPAN&gt;'federationInfo'&lt;/SPAN&gt;&lt;SPAN&gt;]&lt;/SPAN&gt;&lt;SPAN&gt;[&lt;/SPAN&gt;&lt;SPAN&gt;'idpAuthorizeUrl'&lt;/SPAN&gt;&lt;SPAN&gt;]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt; data &lt;SPAN&gt;=&lt;/SPAN&gt; post_data&lt;SPAN&gt;,&lt;/SPAN&gt; allow_redirects &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;True&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt; auth&lt;SPAN&gt;=&lt;/SPAN&gt;credentials&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;You will have to use BeautifulSoup again to parse the response and get the code from the response variable by doing something like this :&amp;nbsp;&lt;/P&gt;&lt;P&gt;code = soup.find(id='code')['value']&lt;/P&gt;&lt;P&gt;I think the article is missing this step but it is implied somewhere.&lt;/P&gt;</description>
      <pubDate>Fri, 04 Feb 2022 05:40:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/is-it-possible-to-use-the-arcgis-online-python-api/m-p/1140670#M7082</guid>
      <dc:creator>WengNg2</dc:creator>
      <dc:date>2022-02-04T05:40:55Z</dc:date>
    </item>
  </channel>
</rss>

