laptop and a wrench

Bug

ArcGIS API for Python fails to authenticate with the following error message, "Exception: Unable to generate oauth token" returned when using built-in credentials and the Python environment in ArcGIS Server.

Portal for ArcGIS
Bug-ID-Nummer BUG-000160690
EingereichtAugust 16, 2023
Zuletzt geändertFebruary 14, 2025
Gilt fürPortal for ArcGIS
Gefunden in Version11.1
BetriebssystemWindows Server
Betriebssystemversion2019 64 Bit
StatusWill Not Be Addressed

Zusätzliche Informationen

In ArcGIS Enterprise 11.x, administrators have the ability to disable the built-in Portal for ArcGIS account. If the SAML and built-in accounts are enabled, ArcGIS API for Python authenticates successfully. The other alternative is to use 'use_gen_token=True' with the built-in account information. ArcGIS API for Python does not support SAML logins.

Workaround

Edit the authentication line to include 'use_gen_token=True'.

For example: gis = GIS(portal_url, username, password, use_gen_token=True)

Schritte zur Reproduzierung

Bug-ID: BUG-000160690

Software:

  • Portal for ArcGIS

Benachrichtigung erhalten, wenn sich der Status eines Bugs ändert

Esri Support App herunterladen

Weitere Informationen zu diesem Thema erkunden

Unterstützung durch ArcGIS-Experten anfordern

An den technischen Support wenden

Esri Support App herunterladen

Zu Download-Optionen wechseln