AnsweredAssumed Answered

arcpy.SignInToPortal() failed to sign in

Question asked by mjiangesriaustralia-com-au-esridist Employee on Feb 5, 2020
Latest reply on Sep 20, 2020 by mjiangesriaustralia-com-au-esridist

Hi all,

Trying to run below code in a stand-alone script from my laptop to connect a portal in a cloud environment. 

 

arcpy.SignIntoPortal("https://domain/arcgis","portaladmin","adminpasswrod") 

However, always getting an exception as:

Unable to connect ArcGIS Online.

if pasting above code in python window within ArcGIS Pro,  that works fine with a response like:

{'token': 'l4ZVIQ3I00lS2u-C_2f57FAYSwuDqmkaUIZVe7OZAY3FHG1HdipxRlA6szCMkrPq0Qe5xtDqOV0QvLZ4kXcGY0R8nu7yfNta-mzGFZwURBbg..', 'referer': 'http://www.esri.com/AGO/0077BA04-30C4-4F1F-81BF-F47BF2B277EE', 'expires': 1580995337}

Interesting thing i have noted that if open Fiddler when running the script, it successfully connected.

 

Suspecting this might relate to SSL. Just a check if anyone runs into this previously. 

 

Cheers

minbin

Outcomes