Visitors

Unable to remove permissions in vCenter

One of my customers was getting a strange error when trying to remove permissions in vCenter:

The “Remove Permission” operation failed for the entity with following error message. The object or item referred to could not be found.

The Remove Permission operation failed for the entity with following error message. The object or item referred to could not be found

But the user was there! I asked him to add a new user and then remove it. He did that without an issue.

Then he showed me that he can add this user second time… Wait… Second time? What the hell???

So we had 2 entries:
MYLABDANIEL <– new one
and
MYLABdaniel <– old one

Hmm… And when I checked VPX_ACCESS table in vCenter database I had only one user there – the old one…

Here is script to check the table:

SELECT [ID],[PRINCIPAL],[ROLE_ID],[ENTITY_ID],[FLAG]
FROM [mgmtvcenter].[dbo].[VPX_ACCESS]
GO

Remove new user from vCenter – you should be still able to – and then check your user ID
In my case it was:

ID    PRINCIPAL       ROLE_ID  ENTITY_ID   FLAG
502   MYLABdaniel    -1       1           1

So… let’s remove that one… STOP!!! Backup the database first!

We can remove our guy:

DELETE FROM VPX_ACCESS WHERE ID = 502;

Restart vCenter service and that’s it!

(c) Zbigniew ‘Ziggy’ Misiak

3 comments to Unable to remove permissions in vCenter

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>