I am planning to change the database password for an enterprise geodatabase user to make it more secure. This user's credentials appear in ArcGIS Pro projects' layers and tables, .sde files, ArcGIS Server services, the Server data store, and even in ArcMap documents.
ArcGIS Pro will not allow me to create a database connection file using the intended new password because of a Bad login user error. I see no way to bypass this. I was hoping to use the .sde file in my code with the updateConnectionProperties method. But how can I supply current_connection_info and new_connection_info if I can't create both of them now?
To bypass the UI, I tried calling arcpy.management.CreateDatabaseConnection in a Python Notebook with the user's current password. The resulting .sde file was unusable. I believe it's because I can't supply an encrypted string for the password parameter. A similar method, CreateDatabaseConnectionString, also expects an encrypted password string. Encryption isn't the same as hashing, so I must suppose that ArcGIS Pro is using a private key with an algorithm to produce the needed argument for the function. But how can I do this myself?
Any generic or specific help you can provide would be appreciated. Your time is valuable; I am thankful you are spending some of it helping me. Feel free to ask any questions, too.