How do I find "unlicensed" users for my Bitbucket Server instance?
Platform Notice: Server and Data Center Only - This article only applies to Atlassian products on the server and data center platforms.
Unlicensed users are ones that are in Bitbucket user database, created locally or synchronized from external user directories, and which do not have access to Bitbucket Server on the Global Permissions page either:
- Directly via username
- Via a group which the user is part of
Run the following query against the database:
SELECT name FROM sta_normal_user WHERE NOT EXISTS ( SELECT * FROM sta_global_permission WHERE user_id = sta_normal_user.user_id ) AND NOT EXISTS ( SELECT * FROM cwd_membership WHERE parent_name IN ( SELECT group_name FROM sta_global_permission ) AND child_name = sta_normal_user.name );
The plugin is locked down to administrators but it can be uninstalled from the
Manage Plugins screen if preferred.