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.