I trying to develop a web tool from a notebook in ArcGIS Onine. I can access public features services OK but not secured services. Is there any way to make this work - including after I publish it as a web tool? I'll need it to run under authority of the user running the web tool, so I can't use a known username and password to log in.
import arcpy
gis = GIS("home")
public_url = 'https://utility.arcgis.com/usrsvcs/servers/8bf6c4b09a3b4b2a8abadd08ac23e42b/rest/services/ROW/PublicData/FeatureServer/0'
private_url = 'https://utility.arcgis.com/usrsvcs/servers/de103079a25a422c9a92e26f35f4cf2d/rest/services/ROW/DEMO/FeatureServer/2'
arcpy.Describe(public_url) # Works
arcpy.Describe(private_url) #Fails "does not exist"