laptop and a wrench

Error

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
Número de ID del error BUG-000160690
EnviadoAugust 16, 2023
Última modificaciónFebruary 14, 2025
Relacionado conPortal for ArcGIS
Versión encontrada11.1
Sistema operativoWindows Server
Versión de sistema operativo2019 64 Bit
EstadoWill Not Be Addressed

Información adicional

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.

Solución alternativa

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

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

Pasos para reproducir

ID del error: BUG-000160690

Software:

  • Portal for ArcGIS

Recibir notificaciones cuando cambie el estado de un error

Descargar la aplicación de soporte de Esri

Descubrir más sobre este tema

Obtener ayuda de expertos en ArcGIS

Contactar con el soporte técnico

Descargar la aplicación de soporte de Esri

Ir a opciones de descarga