IBM Support

Error AIUCO1026E: Unable to create user with id=<userid>, since it is already taken by a previously-deleted user.

How To


Summary

Starting in Maximo Application Suite 8.11, the system retains the details of the deleted users.
The user deletion behavior is unchanged. The deleted users do not appear in the UI and are not included in any API responses. Any reserved AppPoints are relinquished, and the users cannot login to Maximo Application Suite. The only noticeable difference is that the user IDs, usernames, and email addresses of deleted users are not available for reuse by existing or new users.

The only way to restore the user or permanetly delete the user from MAS is to update or delete the document in the mongoDB database.

Steps

1- Connect to the mongoDB shell 
https://www.ibm.com/support/pages/how-open-mongo-shell-mas-mongodb
2- List the databases:
show dbs
3- Use the mas core database:
use mas_<mas instance id>_core
4- find the user you want to restore or delete:
db.User.find({"_id" : "testuser"})
When the user is deleted, the document will end with the deleted information, i.e. user who deleted the record and the time of deletion, for example:
"deleted" : { "id" : "masadmin", "timestamp" : "2023-11-28T09:56:29.840785" }
You can then either restore the user or remove it from the database
To restore the user, execute the following command:
db.User.update({username: "testuser"},{$unset: {deleted:""}})
Once the command is executed, the user is visible again in MAS, however it is not visible in Manage.
An update to the user in MAS will lead to a syncronization failure with Manage. You need to reactivate the use in Manage.

To remove the user, execute the following command:
db.User.deleteOne({username: "testuser"})
You can also use the fields "_id" for user Id, and "emails.value" for email in the find, update or deleteOne query.
For example the related queries would be:
db.User.find({"_id":"testid"})
db.User.find({"emails.value":"testuser@example.com"})
If you create a new user with the id of the user that you deleted, the syncronization with Manage will fail, you will have to reactivate the user in Manage.
The instructions to reactivate the user in Manage are here:
https://www.ibm.com/support/pages/reinstating-deleted-person-record-maximo
NOTE: removing the user from the database is permanent, it is recommended to have a working backup before attempting such operation. 

Additional Information

When the syncronization with Manage fails, you can see in the MAS user UI a red triangle next to the user name. In the usersyncagent pod in the manage namespace, you can see an error like:
Exception: [masml test100] synched: status_code: 400 r.text Error 400: BMXAA3888E - The user you selected is in use by a deleted user and cannot be reused.

Document Location

Worldwide

[{"Type":"MASTER","Line of Business":{"code":"LOB59","label":"Sustainability Software"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSRHPA","label":"IBM Maximo Application Suite"},"ARM Category":[{"code":"a8m3p000000hAeeAAE","label":"Maximo Application Suite-\u003ECore"}],"ARM Case Number":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions"}]

Document Information

Modified date:
25 January 2024

UID

ibm17085329