Cross product User search in Add-On


I’m developing an Add-On which is currently a Jira add-on. In it, I do a user search (broadly) as follows:

UserSearchParams searchParams = new UserSearchParams(false, true, false);
List<ApplicationUser> users =".", searchParams);

Now this works fine but I’d like to change my add-on to be a RefApp add-on, so that it can be used in several Atlassian products, e.g. Confluence, Jira, etc.

I have 2 questions before I go to the trouble of changing my add-on:

  1. How do you search for all active users from a RefApp add-on?
  2. Does the search shown above only find Jira users because its using the com.atlassian.jira… component?