laptop and a wrench

Bogue

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
Numéro d’ID de bogue BUG-000160690
EnvoiAugust 16, 2023
Dernière modificationFebruary 14, 2025
S’applique àPortal for ArcGIS
Version trouvée11.1
Système d’exploitationWindows Server
Version du système d’exploitation2019 64 Bit
StatutWill Not Be Addressed

Informations supplémentaires

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.

Solution de contournement

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

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

Étapes pour reproduire

ID de bogue: BUG-000160690

Logiciel:

  • Portal for ArcGIS

Recevoir une notification lorsque le statut d’un bogue change

Télécharger l’application Esri Support

En savoir plus sur ce sujet

Obtenir de l’aide auprès des experts ArcGIS

Contacter le support technique

Télécharger l’application Esri Support

Accéder aux options de téléchargement