When limit parameter is used less results than expected are retrieved.
- Bitbucket 5.9.1
- A local instance has 1753 users:
3 of them are granted direct global permission, one having System Admin permission and the other 2 having Bitbucket User permission:
6 of them are granted indirect Bitbucket User permission by belonging to stash-users group that has Bitbucket User permission:
User fkraemer shows up twice because this user is given direct permission as System Admin and indirect permission via group membership as Bitbucket User.
- All the other users are unlicensed.
- Running the following REST API retrieves 8 users, as expected:
This is because users having LICENSED_USER permission have been retrieved, so the user fkraemer which has direct System Admin permission was not included in the result.
- However, if ?limit=10000 (which is higher than the number of users) is appended to the end of the request URL, only 2 users are retrieved:
The same 8 users should have been retrieved.
Only 2 users were retrieved.
Use the endpoint /rest/api/1.0/admin/license suggested under Resolutions section of KB - How do I find which users count against my Bitbucket Server license?.