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?