Loading

×Sorry to interrupt
Uncaught ReferenceError: addCTracking is not defined
throws at https://kb.vmware.com/resource/KM_TealiumTrackingJS?v=0.5:100:1

Refresh

Cookie Preference Center

General Information on cookies

When you visit our website, we use cookies to ensure that we give you the best experience. This information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies by clicking on the different category headings to find out more and change your settings. However, blocking some types of cookies may impact your experience on the site and the services we are able to offer. Further information can be found in our

Cookie Policy.

Strictly Necessary

Strictly Necessary

Always Active

Strictly Necessary

Strictly necessary cookies are always enabled since they are essential for our website to function. They enable core functionality such as security, network management, and website accessibility. You can set your browser to block or alert you about these cookies, but this may affect how the website functions. For more information please visit www.aboutcookies.org or www.allaboutcookies.org.

Cookie Details‎

Performance

Performance

Performance

Performance cookies are used to analyze the user experience to improve our website by collecting and reporting information on how you use it. They allow us to know which pages are the most and least popular, see how visitors move around the site, optimize our website and make it easier to navigate.

Cookie Details‎

Please confirm your settings by refreshing the page.

Functional

Functional

Functional

Functional cookies help us keep track of your past browsing choices so we can improve usability and customize your experience. These cookies enable the website to remember your preferred settings, language preferences, location and other customizable elements such as font or text size. If you do not allow these cookies, then some or all of these services may not function properly.

Cookie Details‎

Advertising

Advertising

Advertising

Advertising cookies are used to send you relevant advertising and promotional information. They may be set through our site by third parties to build a profile of your interests and show you relevant advertisements on other sites. These cookies do not directly store personal information, but their function is based on uniquely identifying your browser and internet device.

Cookie Details‎

Advertising Cookies

Consent Leg.Interest

Select All Vendors

Select All Vendors

Select All Hosts

Select All

Clear Filters

Information storage and access

Apply

Confirm My Choices Reject All Allow All

My Subscriptions

Loading

Knowledge Base

How to manually remove a directory from vRealize Automation (59663)

Last Updated: 3/22/2024Categories: How toTotal Views: 4134Language:
English

1 like this article

Subscribe to get an email
newsletter with new updates

1 people found this helpful Please provide article feedback:

Symptoms

Syncronizations fail for a specific directory

Error in UI: "Failed to complete sync due to a problem with the service.  Exception Info: User is not authorized"

Error found in connector.log / catalina.out / horizon.logs:

2018-10-04 17:31:35,128 ERROR (tomcat-http--13) [[email-masked];<USERNAME>@VSPHERE.LOCAL;10.141.2.200] com.vmware.horizon.connector.admin.controller.DirectoryController - Could not add the Bind user - Could not bulk push Users, Groups. Received Response Code: 401 and Response body: {"errors":[{"code":"unauthorized","message":"User is not authorized.","parameters":null}]}

Deleting the directory in the UI fails with "Internal Server Error"

Purpose

Removal of corrupted directory configuration from postgres database

Impact / Risks

Ensure there is a valid database backup before execution of steps in this Knowledge article.

Resolution

To manually delete, then recreate a problematic directory, perform the steps below:

Isolate idOrganization and domain values:

Run these three statements to identify ID and UUID of directory to be removed:

su - postgres

cd /

psql -d vcac

set schema = 'saas';

\x

Select * from "Organizations";

Select * from "Domain";

Select * from "DirectoryConfig";

In the below record note the id is 53 the directoryConfigID is 53 and the uuid 7b6cd22a-f7bb-4347-8ca6-70f75f1a6a0e for the Directory "Core.local" which is to be deleted.

Note:
Select * from "Domain";
-[ RECORD 2 ]-----+-------------------------------------
id                | 53
uuid              | 7b6cd22a-f7bb-4347-8ca6-70f75f1a6a0e
domainName        | corp.local
netBiosName       | CORP
domainControllers | []
directoryConfigId | 53
createdDate       | 2018-07-18 19:17:03.812+00
timestamp         | 1531941423812000000
resolved          | t

Once the id and uuid are identified, substitute the values from previous queries to build the Delete statements below.

DELETE from "UserGroup" where "idGroup" in (select "id" from "Group" where "idOrganization" = '53' and "domain" = 'corp.local');
DELETE from "GroupParent" where "groupUuid" in (select "uuid" from "Group" where "idOrganization" = '53' and "domain"='corp.local');
DELETE from "Group" where "idOrganization" = '53' and "domain"='corp.local';
DELETE from "UserRole" where "idUser" in (select "idUser" from "Users" where "domain"='corp.local' and "strNotDeleted"='1' and "idOrganization"='53');
DELETE from "UserArtifacts" where "idUser" in (select "idUser" from "Users" where "domain"='corp.local' and "strNotDeleted"='1' and  "idOrganization"='53');
DELETE from "Users" where "domain"= 'corp.local' and "strNotDeleted"='1' and "idOrganization"='53';
DELETE from "Domain" where "id"='53' and uuid ='7b6cd22a-f7bb-4347-8ca6-70f75f1a6a0e';
DELETE from "DirectoryConfig" where "id" = '53' and "uuid" ='43248bc4-7c79-4844-b9cc-baecd3667c9d';
DELETE from "UserDomain" where "id"= '53';

The Directory should now be removed.

Recreate the directory and redirect users to an existing directory:

Change any users who are pointing to the removed directory and verify that their uuid is pointing to the new directory:

155 is the ID if the new directory in the example below from the query: "Select * from "Domain";".

Run the query and note the new uuid. The userstoreUuid will now need to be updated to point to the new directory.

select * from "DirectoryConfig" where "id"=155;
-[ RECORD 1 ]-----------------------+------------------------------------------------------------------------------------
id | 155
uuid | 1ad9ff83-3183-4b79-9b5a-e369cc3cf6f0
tenantId | VSPHERE.LOCAL
host |
port |
useSsl | f
sslCertificate |
directorySearchAttribute | SAM_ACCOUNT_NAME
useSRV | t
baseDN | DC=corp,DC=local
bindDN | CN=svc_adaccess,OU=Users,DC=corp,DC=local
createdDate | 2018-10-06 00:51:09.402+05:30
timestamp | 1538767307988281408
name | corp.local

vcac=# select * from "UserStore";
-[ RECORD 4 ]------------+-----------------------------------------------
id | 155
uuid | e17526a1-4519-4b8a-8bb1-198c3e89c390
idOrganization | 2
name | Userstore_1ad9ff83-3183-4b79-9b5a-e369cc3cf6f0
createdDate | 2018-10-06 00:51:09.387+05:30
timestamp | 1538767302615233751
syncClientId | 410
userStoreNameUsedForAuth | f

vcac=# select * from "Users" where "domain"='corp.local' and "strUsername"='testuser';
-[ RECORD 1 ]------+-------------------------------------
strUsername | Testuser
idUser | 546
idOrganization | 2
idUserStatus | 1
strFirstName | Testuser
strLastName | Testuser
strEmail | [email-masked]
strPhone | 7507559
strActivationCode |
idEncryptionMethod | 2
createdDate | 2018-07-19 01:31:27.564+05:30
strNotDeleted | 1
strExternalId | b7cc258b-abe1-4c63-9341-c6cc5a29130c
timestamp | 1538676872108798305
userStoreUuid | ce1f37c8-ed43-46cb-b18a-d9608affc415
userType | PROVISIONED
uuid | c72ad673-9af6-4928-85ed-95bb03146fd2
domain | corp.local

Modify the users in which are pointing to the old userStoreUuid:

Update a single user:

update "Users" set "userStoreUuid"='e17526a1-4519-4b8a-8bb1-198c3e89c390' where "strUsername"='testuser' and "domain"='corp.local';

Update all other users

update "Users" set "userStoreUuid"='e17526a1-4519-4b8a-8bb1-198c3e89c390' where "userStoreUuid"='ce1f37c8-ed43-46cb-b18a-d9608affc415' and "domain"='corp.local';

Detectable by VMware SkylineTM

Actions

Copy

link to clipboard
copied!

Print

Language:
English

Attachments

Additional Resources

KB
•
在升级到 6.0 或更高版本后，vCenter Server 任务和事件保留期限从 180 天更改为 30 天 (59261)

Result 1 of 1

Ask The Community

Get answers quickly from VMware experts in the community

Post Subject

CONTINUE IN COMMUNITIES

Related Products:

VMware Aria Automation

Related Versions:

VMware vRealize Automation 7.x

Take Our Survey

Support Assistant