Reputation: 33
In the official documentation there is an example to make a DELETE request in order to delete a member from a group. Here's the documentation - remove member
DELETE https://graph.microsoft.com/v1.0/groups/{group-id}/members/{directory-object-id}/$ref
So far from what i've found and tested, when adding an user to a group, you can add up to 20 users per request, into a group. add member
PATCH https://graph.microsoft.com/v1.0/groups/{group-id}
Content-type: application/json
Content-length: 30
{
"[email protected]": [
"https://graph.microsoft.com/v1.0/directoryObjects/{id}",
"https://graph.microsoft.com/v1.0/directoryObjects/{id}",
"https://graph.microsoft.com/v1.0/directoryObjects/{id}"
]
}
I was wondering if there is any possibility to remove multiple users from a group per request, or if you could remove 20 users at a time from a group, per request, like you can do when you're adding them into a group.
Upvotes: 1
Views: 1837
Reputation: 1
You can combine multiple requests in one HTTP call using JSON batching (check here). But JSON batch requests are currently limited to 20 individual requests.
Upvotes: 0