So we have a script to add users to our ArcGIS Enterprise portal. Unfortunately it is erroring out on a particular user passing this in the python log: "Exception: The user already exists. Please check the username and try again.
(Error Code: 500)"
Awesome. Searching for the offending username in the portal manager and in the Organization-->Members area shows that there are 0 users with that id. Not awesome. Does anyone have any idea how to 'clear' this id so that we can actually add this user into the portal?
Solved! Go to Solution.
After searching I was able to find this regarding the removal of users from Enterprise Portal: https://community.esri.com/t5/arcgis-enterprise-portal-questions/cannot-delete-portal-users/td-p/310...
Even though our offending usernames weren't listed via web query I was able to issue the commands in psql using our administrator account and see that there were indeed accounts with that name in the PostgreSQL database. Re-indexing the database and table after removing the offending accounts solved our issue. Also, for those that pull usernames as emails from AD, your users may be entered with caps, all caps, first and last character caps, etc. We are now standardized so that we have a set convention, but these appeared to be older user accounts so using a like statement may work better than an explicit equality.
After searching I was able to find this regarding the removal of users from Enterprise Portal: https://community.esri.com/t5/arcgis-enterprise-portal-questions/cannot-delete-portal-users/td-p/310...
Even though our offending usernames weren't listed via web query I was able to issue the commands in psql using our administrator account and see that there were indeed accounts with that name in the PostgreSQL database. Re-indexing the database and table after removing the offending accounts solved our issue. Also, for those that pull usernames as emails from AD, your users may be entered with caps, all caps, first and last character caps, etc. We are now standardized so that we have a set convention, but these appeared to be older user accounts so using a like statement may work better than an explicit equality.
We have found that the User Search is case sensitive. If you are looking for Steve but instead the user has been added to your system like : steve. It wont pull it up.
Dan
I had a feeling that was the case I just didn't know what the magic combo was. After finding the info for where the portal user data was stored, I was able to make the proper queries and remove them that way 😊