How to recover the deleted 'crowd-administrators' group

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

There is a bug that allows the 'crowd-administrators' group to be deleted. Afterward, administrators will no longer have access to Crowd. This How-To article tells you how to recover when it is mistakenly deleted.

The bug is reported in CWD-1661 - Able to delete "Crowd-Administrators" and not access Crowd anymore.

Solution

  1. Recreate 'crowd-administrators' group

    1 2 insert into cwd_group(id, group_name, lower_group_name, active, is_local, created_date, updated_date, description, group_type, directory_id) values ( '888888','crowd-administrators','crowd-administrators','T','F','2015-09-25 12:20:29','2015-09-25 12:20:29',NULL,'GROUP',(select id from cwd_directory where directory_type='INTERNAL'));
  2. Find the ID of users who will join 'crowd-administrators' group

    1 select * from cwd_user;
  3. Recreate group memberships, replacing <id from step 2> in the code. You need to execute the SQL query multiple time according to the number of users you want to join to 'crowd-administrators' group

    1 2 insert into cwd_membership (id, parent_id, child_id, membership_type, group_type, parent_name, lower_parent_name, child_name, lower_child_name, directory_id) values (777777, (select id from cwd_group where group_name='crowd-administrators' and directory_id=(select id from cwd_directory where directory_type='INTERNAL')), <id from step 2>, 'GROUP_USER', 'GROUP', 'crowd-administrators', 'crowd-administrators', <user_name from step 2>, <lower_user_name from step 2>, (select id from cwd_directory where directory_type='INTERNAL'));
  4. Find the directory-to-application mapping

    1 2 3 4 select m.id, m.application_id, m.directory_id from cwd_app_dir_mapping m join cwd_directory d on m.directory_id = d.id join cwd_application a on m.application_id = a.id where d.directory_type='INTERNAL' and a.application_type = 'CROWD';
  5. Give the group access to the application, replacing <id from Step 4>, <application_id from Step 4>, and <directory_id from Step 4>

    1 2 insert into cwd_app_dir_group_mapping (id, app_dir_mapping_id, application_id, directory_id, group_name) values (898990, <id from Step 4>, <application_id from Step 4>, <directory_id from Step 4>, 'crowd-administrators');
  6. Enable System Administrator flag for 'crowd-administrators'

    1 2 insert into cwd_granted_perm (id, created_date, permission_id, app_dir_mapping_id, group_name) values ('999999', '2015-09-25 12:20:29', 2, <id from Step 4>, 'crowd-administrators');
Updated on April 2, 2025

Still need help?

The Atlassian Community is here for you.