laptop and a wrench

Bug

The first Login behavior requires ArcGIS API for Python to set a new password, but not when logging into Portal for ArcGIS directly.

ArcGIS API for Python
Bug ID Number BUG-000156523
SubmittedMarch 12, 2023
Last ModifiedJune 5, 2024
Applies toArcGIS API for Python
Version found2.0.1
Operating SystemWindows OS
Operating System Version10.0 64 Bit
StatusWill Not Be Addressed

Additional Information

The ArcGIS Enterprise and ArcGIS Online system changed the login process to include things like email verification and security questions. It is recommend that when logging in via code using the Python API for the first time, use the `use_gen_token=True` for the first time and call `gis.user.me.update()` to set the security question. gis = GIS( url="SITE", username="USERNAME", password="PASSWORD", use_gen_token=True, ) gis.users.me.update(security_question=, security_answer="ENTER THE ANSWER") Once this is completed, log back into the system normally without the `use_gen_token`. gis = GIS( url="SITE", username="USERNAME", password="PASSWORD")

Workaround

The ArcGIS Enterprise and Online system changed the login process to include things like email verification and security questions. It is recommend that when logging in via code using the Python API for the first time, use the `use_gen_token=True` for the first time and call `gis.user.me.update()` to set the security question. gis = GIS( url="SITE", username="USERNAME", password="PASSWORD", use_gen_token=True, ) gis.users.me.update(security_question=, security_answer="ENTER THE ANSWER") Once this is completed, log back into the system normally without the `use_gen_token`. gis = GIS( url="SITE", username="USERNAME", password="PASSWORD")

Steps to Reproduce

Bug ID: BUG-000156523

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