Select to view content in your preferred language

Logging in to Arcgis for Python and Arcpy. Does one log-in pick up the other?

472
2
03-19-2024 12:44 PM
mistersig_cc
Emerging Contributor

I have a custom script that backs up AGO feature service. My script is using copied conda environment from arcgis pro but a separate python install. In my script I log-in to AGO through the ArcGIS for python library but I don't log in to arcpy using arcpy.SignInToPortal and I'm able to pull my feature service with the arcpy.conversion.ExportFeatures by passing the item_url as a variable for in_features. The  feature service is internal and not shared to the organization or public. 

My question.

Why don't I have to log-in for arcpy? Does arcpy pick up the credentials from my log-in to arcgis for python? 

Tags (2)
0 Kudos
2 Replies
BlakeTerhune
MVP Regular Contributor

Please clarify if you're working with ArcGIS Online or ArcGIS Enterprise and what type of authentication it's configured for. Also, does the user running the script have an account in your ArcGIS Online/Portal?

0 Kudos
mistersig_cc
Emerging Contributor

Please clarify if you're working with ArcGIS Online or ArcGIS Enterprise and what type of authentication it's configured for.

ArcGIS Online. 

Also, does the user running the script have an account in your ArcGIS Online/Portal?

YES

 

0 Kudos