Worked out a way to read the windows CA certs and make those trusted... This would be the preferred solution so that the certificates are still verified.
Need to fully test solution first...
Kudos to @AltitudeGIS encouraging identifying a solution to this...
# Get certs and store them!
ca_cert_file = r'C:\tmp\cacerts.pem'
f = open (ca_cert_file,'wb')
import wincertstore
for storename in ("CA", "ROOT"):
with wincertstore.CertSystemStore(storename) as store:
for cert in store.itercerts(usage=wincertstore.SERVER_AUTH):
print(cert.get_pem().decode("ascii"))
print(cert.get_name())
print(cert.enhanced_keyusage_names())
f.write(cert.get_pem().decode("ascii"))
f.close()
import requests
from requests_arcgis_auth import ArcGISPortalSAMLAuth
s = requests.session()
s.auth = ArcGISPortalSAMLAuth('CLIENT_ID',verify = ca_cert_file)
r = s.get(r'https://ORG.maps.arcgis.com/sharing/rest/portals/self?f=json',verify = ca_cert_file)
print r.json().get('user')`
Worked out a way to read the windows CA certs and make those trusted... This would be the preferred solution so that the certificates are still verified.
Need to fully test solution first...
Kudos to @AltitudeGIS encouraging identifying a solution to this...