With ArcGIS Enterprise 10.9 it is possible to configure your ArcGIS Portal to use OpenID Connect for login. Unfortunately the Python API for ArcGIS does not fully support this for an "non interative way" (browser opens for identification). For automation purposes it should be possible to use AD users to login without interaction.
The current solution proposed from Esri is to use builtin users for this kind of automation.