Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-19731

Missing users in the users export and GET Users REST API endpoint

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Low Low
    • None
    • 8.9.1, 8.19.10
    • API - REST

      Issue Summary

      • Export > Users (feature of the Admin > Users page: <Base_URL>/admin/users) doesn't include all the users from Crowd directory
      • The list of users fetched by the GET Users REST API endpoint is also incomplete.
      • Bitbucket instances having a large number of user entries in the cwd_user table are impacted.

      This is reproducible on Data Center: yes

      Steps to Reproduce

      • Create a Bitbucket Instance with a large set of users (~60,000 users) using an Active directory or Crowd
      • Note that this set of users should be unique and from the same user directory.
      • Create a small set of users which are present in another directory which should be inactive having the same usernames and attributes. This was the scenario for the customer's case but we are not sure if this step is actually necessary.
      • Note the count of the active and unique users from the cwd_user table in the database.
      • Export all users from Bitbucket's web interface and note the count of the unique users returned in the resulting CSV file.
      • Also run the GET Users REST API endpoint API and check the number of unique users returned in the total response for all pages.
      • Increment / decrement the size of the property page.max.user and repeat the tests and note the difference.
      • Note that customising this value may cause some missing users to appear but does not guarantee the correct export data.

      Expected Results

      • The export file, or the list of users fetched by the GET Users REST API endpoint contains the same number of unique users as the cwd_user table, with no duplicates.

      Actual Results

      • Some users are duplicated while others are missing.
      • The total number of users in the export file may be the same as the total number of users in the cwd_user table, but the export file is still incorrect.
      • Duplicates in the exported user list account for the difference between unique usernames and total number of users returned.
      • Renaming a missing user may allow it to appear in the export as it changes its position alphabetically in the exported list.

      Workaround

      • You may query the cwd_user table directly using a query such as:
        SELECT * FROM cwd_user WHERE is_active = 'T'  
        
      • Using the crowd API directly to export the list of users.

            [BSERV-19731] Missing users in the users export and GET Users REST API endpoint

            There are no comments yet on this issue.

              Unassigned Unassigned
              8c8205d742ae Priyata Waje
              Affected customers:
              0 This affects my team
              Watchers:
              6 Start watching this issue

                Created:
                Updated: