ERROR
Running an ArcGIS API for Python script that requires signing in to Portal for ArcGIS may fail and return the following error:
Error: json.decoder.JSONDecoderError:Expecting value: line 1 column 1
This error occurs when attempting to connect to Portal for ArcGIS using the domain name server (DNS) alias and the portal is authenticating through a web-tier authentication (IWA or SAML).
To solve this issue, use the fully qualified domain name (FQDN) to connect to the portal.
gis = GIS("https://<machine.domain.com>:7443/arcgis", "username", "password", verify_cert = False)
Note: For portals authenticating through web-tier authentication, using the FQDN with port 7443 is the only workaround for this issue, and users are unable to use DNS within the script.
Get help from ArcGIS experts
Download the Esri Support App