The ArcGIS Online enterprise sign-in, in our case ADFS, is not supported by ArcGIS API for Python, this has been identified as a bug and enhancement back in 2/23/2017 ENH-000103131. This is problematic because if an enterprise user wishes to schedule to run a task periodically, this can't be accomplished with the enterprise sign-in.
Similar issue was also reported and discussed in Geonet (https://community.esri.com/t5/arcgis-api-for-python-questions/is-it-possible-to-use-the-arcgis-onlin...), but the suggested solution by Rohit would not work because it would still need the user to enter the AppID interactively.
Just a note to say that you will be able to setup Notebook tasks with the next release of ArcGIS Online meaning the script gets run on a schedule. Through that the gis = GIS('home') login option can be used to login.
It doesn't fix the problem you're encountering but it may help in some cases.
Thank you Michael, looking forward testing the new release.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.