0
votes

The documentation for Office 365 unified API (beta) does not mention how to remove a user from a group once you add them. There is code to unsubscribe (not the same as removing), but it's only for the currently logged-in user.

I tried getting the user ID and issuing a DELETE (using /groups/xxxxxxxxx/members/yyyyyyyyyy), but it does not allow this. I can't even find the record ID that would correspond to a member (rather than a user).

How do I remove a user from a group using the API?

1
I know that we can delete the group, recreate and then re-add the appropriate users, but then everybody gets another welcome email. Not a good workaround.cbishop

1 Answers

0
votes

To delete a member of a group: DELETE https://graph.microsoft.com/beta/myorganization/groups(‘gid’)/members(‘uid’)/$ref