Important Update: Archer Community Scheduled Maintenance on November 23–24 - New Community Launching Soon! Learn More..
2022-05-13 06:00 AM
We manually searched the user list for that username and were unable to locate it; we also tested the API method 'DoesUserExist,' which returned false. Even if we try to change the username in the account manually, it won't let us, stating that the username already exists.
Any suggestions on this?
2022-05-13 07:04 AM
Probably it exists as deleted. You can search for the user in the DB tblUser. Though it should be suffixed as inactive, but depends on the approach for user deletion over API.
2022-05-13 10:51 AM
How are the users getting deleted? Via the UI, API, SQL, other?
Instead of using web services api, have you considered using the REST API to create user? It allows you to specify username on creation or it will autogenerate a username...see example below.
With each new Archer version, new attributes may get added, so this is not a complete list. To see current list of attributes in your version, make API call to get a user by id.
{
"Password": "Password123$",
"Notification": true,
"Roles": [
73,
76,
100
],
"Groups": [
141,
84
],
"User": {
"FirstName": "John",
"MiddleName": "Micheal",
"LastName": "Doe",
"Username": "jdoe",
"AccountStatus": 1,
"DomainId": null,
"SecurityId": 1,
"LanguageId": 2,
"Locale": "en-US",
"TimeZoneId": "Central Standard Time",
"Address": "<p>123 Main St.<br/>Kansas City, KS 66112</p>",
"Company": "ABC",
"Title": "My Title",
"AdditionalNote": "This is my additional notes",
"ForcePasswordChange": true,
"DefaultHomeDashboardId": 9,
"DefaultHomeWorkspaceId": 14
},
"Contacts": [
{
"ContactType": 7,
"ContactSubType": 2,
"Value": "john.doe@abc.com",
"IsDefault": true
},
{
"ContactType": 7,
"ContactSubType": 2,
"Value": "john.doe2@abc.com"
},
{
"ContactType": 7,
"ContactSubType": 2,
"Value": "john.doe3@abc.com"
},
{
"ContactType": 7,
"ContactSubType": 2,
"Value": "john.doe4@abc.com"
},
{
"ContactType": 7,
"ContactSubType": 2,
"Value": "john.doe5@abc.com"
},
{
"ContactType": 9,
"ContactSubType": 1,
"Value": "111-111-1111",
"IsDefault": true
},
{
"ContactType": 9,
"ContactSubType": 2,
"Value": "222-222-2222"
},
{
"ContactType": 9,
"ContactSubType": 2,
"Value": "333-333-333"
},
{
"ContactType": 9,
"ContactSubType": 2,
"Value": "444-444-4444"
},
{
"ContactType": 9,
"ContactSubType": 2,
"Value": "555-555-5555"
}
]
}
2022-05-13 11:52 AM
@Anonymous @JeffLetterman
Users are getting deleted via UI.
Thanks for the suggestion I will check the database and will try this method with REST API.
2022-05-13 12:38 PM
When a user is deleted via the UI/API, the username is prefixed with the user id and an underscore in the database to prevent issue with creating a new user with same username. For example, if username was "jdoe" and user id is 208, the username becomes "208_jdoe" after deletion. The account status id (acct_status_id) is also changed to 99999 in database.
In your example after deleting user, run SQL query against instance database to confirm the behavior is occurring correctly in your environment.