How to delete a user through API in vRealize Operations Manager 6.x
search cancel

How to delete a user through API in vRealize Operations Manager 6.x

book

Article ID: 312262

calendar_today

Updated On:

Products

VMware Aria Suite

Issue/Introduction

This article provides steps to delete a user from the vRealize Operations Manager database through API.

Environment

VMware vRealize Operations Manager 6.6.x
VMware vRealize Operations Manager 6.5.x
VMware vRealize Operations Manager 6.0.x
VMware vRealize Operations Manager 6.1.x
VMware vRealize Operations Manager 6.2.x
VMware vRealize Operations Manager 6.7.x
VMware vRealize Operations Manager 6.4.x
VMware vRealize Operations Manager 6.3.x

Resolution

To delete user in vRealize Operations Manager 6.x:
 
  1. Log in to vRealize Operations Manager master node as root through SSH or Console.
  2. Run this command to get a list of user names with internal IDs.
su - postgres -c "/opt/vmware/vpostgres/current/bin/psql -d vcopsdb -c 'select * from user_name'"

Note: You see the output similar to:

id | name
-------------------------------------+-----------------------------
<ID_1> | maintenanceAdmin

<ID_2> | VSPHERE.LOCAL\Administrator
<ID_3> | automationAdmin
<ID_4> | migrationAdmin
<ID_5> | admin​
<ID_6> | admin2
  1. Make a note of the ID of the user you want to delete.
Example469708e2-f6d6-4c6e-8922-eea883a54a54 is the ID of admin2
  1. Run this curl command to delete the user:
curl -k -u 'admin:password' -X DELETE https://master_ip/suite-api/api/auth/users/ID
 
Note: Replace password with the password of the admin user, master_ip with the IP address of the Master node and ID with the ID of the user found in step 3.
Example: curl -k -u 'admin:VMware123!' -X DELETE https://192.168.3.10/suite-api/api/auth/users/469708e2-f6d6-4c6e-8922-eea883a54a54 


Additional Information

vRealize Operations Manager 6.x で API を使用してユーザーを削除する方法