ERROR

ArcGIS API for Python: Invalid username or password

Last Published: July 11, 2024

Error Message

When attempting to connect to an ArcGIS Online or an ArcGIS Enterprise portal organization account using the GIS object, the process fails and the following error message is returned in the python terminal:

Error:
Exception: A general error occurred: Invalid username or password.
The error message returned when attempting to connect to an organization using the GIS object

Cause

  • An incorrect username or password is specified in the GIS object. Passwords for ArcGIS Online organization accounts and Portal for ArcGIS are case sensitive, therefore a wrong capitalization warrants an incorrect password entry.
  • The organization is using accounts with authentication schemes in place, such as OAuth 2.0 and Active Directory.

Solution or Workaround

Specify the correct credentials

Ensure the username and password passed in the GIS object contains the correct spelling and are case sensitive.

Use alternative logging in methods depending on the organization's authentication scheme

Apply alternative methods to logging in depending on the organization's authentication settings. Refer to ArcGIS API for Python: Working with different authentication schemes for details on the various authentication schemes and methods.

Article ID: 000033069

Software:
  • ArcGIS Online
  • Portal for ArcGIS
  • ArcGIS API for Python
  • ArcGIS Enterprise 11 3
  • ArcGIS Enterprise 11 2

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Related Information

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options