For Jira Cloud, please ensure that the crawler app is installed and the group atlassian-addons-admin has ‘Browse users and groups’ global permission. More info here.
For Jira Data Center, please ensure the service account has ‘Browse users and groups’ global permission. More info here.