# List Group Members negatively affected by removing from group?

**URL:** <https://devforum.zoom.us/t/list-group-members-negatively-affected-by-removing-from-group/53497>\
**Category:** API and Webhooks\
**Created:** [July 2, 2021, 11:09am UTC](https://devforum.zoom.us/t/list-group-members-negatively-affected-by-removing-from-group/53497 "2021-07-02T11:09:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![charlene.wright](https://avatars.discourse-cdn.com/v4/letter/c/f05b48/32.png) [@charlene.wright](https://devforum.zoom.us/u/charlene.wright)\
**Post date:** [July 2, 2021, 11:09am UTC](https://devforum.zoom.us/t/list-group-members-negatively-affected-by-removing-from-group/53497/1 "2021-07-02T11:09:09Z")

</div>

## Using this template helps us debug your issues more effectively 🙂

**Description**  
It appears that removing members from a group while enumerating results from subsequent GET /groups/{groupId}/members calls using the next\_page\_token parameter results in only getting every other page. Is this correct?

**Error**  
Getting only 1/2 the pages from GET /groups/{groupId}/members.

**Which App Type (OAuth / Chatbot / JWT / Webhook)?**  
JWT

**Which Endpoint/s?**  
/groups/{groupId}/members

**How To Reproduce (If applicable)**  
Steps to reproduce the behavior:

1. Call GET /groups/{groupId}/members
2. Call DELETE /groups/{groupId}/members/{memberId} for each member returned in previous step (1 or 3).
3. Call GET /groups/{groupId}/members?next\_page\_token={whatever was last returned from such a call}.
4. Return to step 2 until there are no more pages returned.
5. Observe that approximately half of the users are still in the group (give or take 30 or 60).
6. Wonder whether removing members from the group while enumerating them is causing every other page of results to be skipped.

---

<div class="post-metadata">

**Author:** ![gianni.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/gianni.zoom/32/32523_2.png) [@gianni.zoom](https://devforum.zoom.us/u/gianni.zoom)\
**Post date:** [July 2, 2021, 6:43pm UTC](https://devforum.zoom.us/t/list-group-members-negatively-affected-by-removing-from-group/53497/2 "2021-07-02T18:43:25Z")

</div>

Hi @charlene.wright ,

We see what the issue is here. What’s happening is that when you delete the members from one page, the update affects the subsequent page results you’re trying to query for.

In order to remedy this, use the “page\_size” query parameter to increase the page size to get all the members you’re looking to delete.

> **[List group members - Groups - Zoom API - API Reference](https://marketplace.zoom.us/docs/api-reference/zoom-api/groups/groupmembers)**
>
> List the members of a group under your account.
> 
> Prerequisite: Pro, Business, or Education account
> Scopes: group:read:admin
> 
> Rate Limit Label: Medium
> 
> ...

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/1/1/116f57ba3a401828d395fe01d6479964b6923a72.png)

Alternatively, you can do what you’re currently doing minus the “next\_page\_token” to grab the new first page results and delete.

Let me know how this works out.

Best,  
Gianni

---

<div class="post-metadata">

**Author:** ![charlene.wright](https://avatars.discourse-cdn.com/v4/letter/c/f05b48/32.png) [@charlene.wright](https://devforum.zoom.us/u/charlene.wright)\
**Post date:** [July 2, 2021, 7:38pm UTC](https://devforum.zoom.us/t/list-group-members-negatively-affected-by-removing-from-group/53497/3 "2021-07-02T19:38:54Z")

</div>

Thanks Gianni. Yes, that’s what I figured was happening.

I got the job done by repeatedly running my process, deleting 1/2 at a time, until I got down to 60 and it deleted them all.

There were over 46,000 accounts to delete, and I wanted to do it incrementally rather than getting the whole list at once, then looping through with delete calls.

Getting a new page 1 until there isn’t one didn’t occur to me, I like that approach. 🙂 I’ll keep that in mind for my next big change!

---

<div class="post-metadata">

**Author:** ![gianni.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/gianni.zoom/32/32523_2.png) [@gianni.zoom](https://devforum.zoom.us/u/gianni.zoom)\
**Post date:** [July 6, 2021, 8:28pm UTC](https://devforum.zoom.us/t/list-group-members-negatively-affected-by-removing-from-group/53497/4 "2021-07-06T20:28:44Z")

</div>

Hi @charlene.wright,

So happy to hear it! Thanks again for your inquiry.

Gianni

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [August 6, 2021, 6:29am UTC](https://devforum.zoom.us/t/list-group-members-negatively-affected-by-removing-from-group/53497/5 "2021-08-06T06:29:10Z")

</div>

Closed on August 6, 2021, 6:29am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
