I think it would be great if ArcPy supports SAML logins (previously known as enterprise logins).
For sites that utilises SAML logins, scripts in ArcPy does not have access to portal data unless ArcGIS Pro is logged into the portal.
The only workaround is to launch ArcGIS Pro and sign in manually and select the 'sign me in automatically' button.
ArcPy currently only supports built-in logins:
https://pro.arcgis.com/en/pro-app/latest/arcpy/functions/signintoportal.htm