laptop and a wrench

Bug

Querying a secured server layer stored in ArcGIS Online fails with the Python API when authenticating with an application client ID.

ArcGIS API for Python
Bug ID Number BUG-000142478
SubmittedAugust 25, 2021
Last ModifiedJuly 18, 2024
Applies toArcGIS API for Python
Version found1.8.5
Operating SystemWindows OS
Operating System Version10.0
StatusNon-Reproducible

Additional Information

This issue is non-reproducible. If this issue occurs, reach out to Esri Support Services as additional information is needed for further investigation.

Workaround

Use the token to generate a separate connection to GIS. Code to reproduce:

from arcgis import GIS

initialLogin_gis=GIS('https://arcgis.com',client_id='fBno9ebLMTP1VwIJ')

initToken=initialLogin_gis._con.token

gis = GIS(token=initToken,referer="https://www.arcgis.com")

item=gis.content.get('4c4e381d00e048918169a7a412dc5904')

item.layers[0].query()

Steps to Reproduce

Bug ID: BUG-000142478

Software:

  • ArcGIS API for Python

Get notified when the status of a bug changes

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options