I'm having trouble connecting to our portal and I think it's because we get redirected to a separate sign in that's not hosted by ESRI (e.g. I enter our organization's URL, the button changes to reflect our organization name and after clicking that it redirects me to our university's sign in, then it authenticates me and redirects me to our portal home page). So it's a third-party identity provider being used... my university username (xyz) that I have to use in the login I am redirected to differs from my portal username (xyz_orgName), though I have tried both and neither work. How do you connect to your web GIS when you have a third-party identity provider?
#Using IDP username
gis = GIS("https://domain.com/web_adapter", "xyz", "myPassword")
#Using username that appears when I am logged into the portal
gis = GIS("https://domain.com/web_adapter", "xyz_myOrg", "myPassword")