Hi,
Is there support for Enterprise Login to ArcGIS Online using ArcPy?
https://pro.arcgis.com/en/pro-app/latest/arcpy/functions/signintoportal.htm
At this stage, the only workaround is to launch ArcGIS Pro and sign in manually and select the 'sign me in automatically' button.