How to fix missing External User Directory in the Bitbucket GUI

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the server and data center platforms.

Summary

The External User Directory in the Bitbucket server is not visible in the GUI but the logs show the user directory is still active and the Users are being synced successfully.

Environment

6.7.1

Diagnosis

  • Run the following SQL query this will show all the data related to directory listing in the UI
SELECT * FROM cwd_application INNER JOIN cwd_app_dir_mapping ON cwd_application.id = cwd_app_dir_mapping.application_id INNER JOIN cwd_directory cd on cwd_app_dir_mapping.directory_id = cd.id;
  • Check if you have a duplicated value on  LIST_INDEX column for the CWD_APP_DIR_MAPPING table. This column should not have duplicated values.

    SELECT * FROM cwd_app_dir_mapping;
    tip/resting Created with Sketch.

    The column should have distinct values from 0 to the number of user directories -1 (e.g 0,1,2 if you have 3 user directories)

    idapplication_iddirectory_idlist_indexis_allow_all
    655371327690T
    26214512293771T
    75366517208992T
    75366717208972T

Cause

The root cause is still unclear but the issue is the list_index column shouldn't have a duplicate value and fixing the duplicate value will show the missing External directory back on the GUI.

Resolution

Remove the duplicates by updating the LIST_INDEX column. It should have values starting from 0 and then incremented by 1 (example 0,1,2,3,... etc).

UPDATE cwd_app_dir_mapping SET list_index=3 WHERE id=753667;

Last modified on Dec 16, 2021

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.