I'm trying to login to Portal using the ArcGIS API for Python, but under a different user than my windows authentication user (python with OAuth 2.0 or the original Admin user). Unfortunately every time I attempt to log in as a different user, the Portal recognizes my windows authentication username and password and logs me in under that user instead. Has anyone else ran into this issue and found a solution? Below is an example of my code and the responses:
print("\n\nIntegrated Windows Authentication using NTLM or Kerberos")
gis = GIS("https://my.portal.org/portal")
print("Logged in as: " + gis.properties.user.username)
print("\n\nPortal-tier Authentication with LDAP - enterprise user")
gisldap = GIS("https://my.portal.org/portal", "activedirectory\\originalAdmin", "password")
print("Logged in as: " + gisldap.properties.user.username)
pythongis = GIS("https://my.portal.org/portal", client_id='pythonappid')
print("Successfully logged in as: " + pythongis.properties.user.username)
Thanks,
Josh