When I try to delete a Unity voicemail account, following messages appear:
This has not happened before. Suspect user was initally set up differently from other users as have no problem deleting voicemail of others.
Any help you can offer would greatly be appreciated.
There's a table on the platform side (CUCM) that maps the end user to a UC user. It sounds like the user may have been deleted from CUCM, but UC still has record of it, so now UC has the orphaned user with no mapping anymore on CUCM, so its likely failing to match up with the CUCM mapping, thus failing.
From CUCM, or the CUCMBE box CLI to confirm that the entry is in fact gone:
run sql select userid, pkid from enduser where userid = 'hytchang'
Likely to be 0 results, which is fine. We'll now have to then manually remove the user from UC. It's a two step process.
From UC or CUCMBE box box CLI first you will need to find the ObjectId for the user that you want to remove:
run cuc dbquery unitydirdb SELECT ObjectId from vw_User WHERE Alias = 'hytchang'
And then you will want to delete that user as such:
run cuc dbquery unitydirdb EXECUTE PROCEDURE csp_UserDelete (pObjectId = 'full objectid that was returned from above query')
Hope that helps,
Did you ever get a response on if forcing the delete removes the users cleanly. i am having the same or very similar issue. LDAP deleted the users from CUCM and when i attempt to delete the users from CUC to reclaim the licenses i am getting the same issue you expressed.Above
Failed to delete Unified Communications Manager user association. To force delete operation, click Here.
Ten Years later, I am having a similar issue to this. I have an account in CUC 11.5SU6 alias KENDRA STAGNER. This user has since Joined Active Directory and has a different alias, but both accounts are on my unity servers, and I cannot delete the non-LDAP KENDRA STAGNER account. I ran the following commands:
admin:run sql select userid, pkid from enduser where userid = '1572009374157002@mil'
Non-LDAP Integrated account:
admin:run cuc dbquery unitydirdb SELECT ObjectId from vw_User WHERE Alias = 'KENDRA STAGNER'
Attempted to remove:
admin:run cuc dbquery unitydirdb EXECUTE PROCEDURE csp_UserDelete (pObjectId ='7c29b9e8-7aa3-4726-82a2-e6f0b26df32b')
Object not found. Object = [465751b2-5d29-42ca-adf0-c2217c459719], Table = [tbl_Mailbox], Column = [MailboxObjectId]
Am I missing something, or is there something going on in my CUC DB? I've had this issue before with this same user a while ago, and I recall fixing it something like this before, but my memory is trash.
This account doesn't appear as a normal account, no option to integrate with LDAP, or make it Local, no option to change the extension, and all Edit fields other than password, change password or roles are all greyed out. Like it's an orphan.
1. Login in to Putty (or any other means that allows you to get to the CLI)
2. Type in the Unity server IP address
3. Select the SSH radial button and then click OPEN.
4. Log in using the Administrator ID and password.
5. At the command line, type in the following command, where XXXX is the user netID.
run cuc dbquery unitydirdb SELECT ObjectId from vw_User WHERE Alias = 'XXXX'
NOTE: If you copy the command line, to paste it in SSH simply right mouse click
This will run a query and give you the database location that should look something like this : d5d1d135-2bfb-4ddb-b775-09878796dcc5
6. To delete the user, type the following command:
run cuc dbquery unitydirdb EXECUTE PROCEDURE csp_UserDelete (pObjectId =' XXXXXXXXXXXXXXXXXXXXXX) where XXXXXXXXXXXXXXXXXXXXXX is the Identity number that came back from your previous query.
Command line should show Rows:0
Double check Unity to ensure the user is deleted.
In my case when i tried to force it, it said that they were still referenced somewhere. It then provided links to the reference and it all made sense. The user was set in a call handler as a "press here to contact BLAH" option. So that reference had to be deleted before i could delete the user.