Sync All app users in Jira 9.0 and above

I am trying to sync all users from Jira in my application but the API I am using is limited to syncing only 1000 users. I want to sync all the users rather than 1000 users. I am using Jira 9.0 and userManager getAllUsers() is deprecated. Here is my current code snippet:

UserSearchService userSearchService = ComponentAccessor.getComponent(UserSearchService.class);
UserSearchParams userSearchParams = (new UserSearchParams.Builder()).allowEmptyQuery(true).includeActive(true).includeInactive(true).maxResults(null).build();

List<ApplicationUser> appUsers = userSearchService.findUsers(null, userSearchParams);

Is there any other API or jql for this? Thanks in advance

Nope. The limit is 1,000.

Past 1,000, you have to use pagination.

Hi @sunnyape ,

Thanks for the response.

Can you please help with the paginated request. I am still struggling with the correct code.

1 Like