When I use this example below with an AGO Enterprise account, I get an error. I can get this to work with an ArcGIS Online account, but we have our organization setup to use enterprise accounts. Thanks for the help!
from arcgis.gis import GIS
from IPython.display import display
gis = GIS("https://www.arcgis.com", "arcgis_python", "P@ssword123")
RuntimeError: Unable to generate token.
Invalid username or password.
(Error Code: 400)