Is there a way to get all the members of a particular group?
-
Anyone know if there is a way to GET all of the members of a particular group? Looking at https://fusionauth.io/docs/v1/tech/apis/groups#add-users-to-a-group I only see Create/Delete.
-
You need to use the user search API with an elastic search query string.
Here's a curl example:
API_KEY=.... GROUP_ID=f4a64b10-1cf6-4289-84c0-c3035f3b78bc curl -H "Authorization: $API_KEY" 'http://localhost:9011/api/user/search/?queryString=memberships.groupId:'$GROUP_ID
If you are using the database search engine, you cannot find all the members of a group.