Before you begin
- An organization-administrator key. Both reading groups and changing their membership are reserved for an organization administrator.
Step 1: Find the group you need
The collection returns the groups your organization has:Request
Response
type tells the three kinds apart. organization is the organization itself, which everybody belongs to. role groups carry the roles — the ones behind the admin and member you set on a user. Everything else, like the visibility group above, is a regular group whose membership is yours to manage.
Each entry also carries displayNames with the group’s name translated into the languages your environment supports (omitted here). When you already know a group’s identifier, GET /groups/{id} returns that one group on its own.
Step 2: Add a member to the group
The group and the member are both named in the path, and there is no body:Request
Response
204 again and changes nothing.
Membership grants access. A group can carry permissions and open up shared folders and documents, so adding somebody widens what they can reach — check what a group confers before you put people into it.
Step 3: See who is in a group
Group membership is a property of the member, so the user collection answers this one:Request
Response
groupIds lists every group the member belongs to, the group you filtered by among them. This is the call to reconcile against your own directory before you change anything.
Step 4: Remove a member
Removal mirrors the addition:Request
Response
204 says the member is not in the group.
Two memberships cannot be changed this way, and both refuse with 400. The organization itself is one: everyone in it belongs to it, and a member cannot be moved to another organization. A role group is the other — set the member’s role instead, as Provision and manage members shows.
Complete example
Bringing a group in line with a list of people from your own system, as a Node.js script. Error handling is minimal for brevity — in production, inspect the error envelope of non-2xx responses.Next steps
- Create the people you are putting into groups — Provision and manage members.
- Confirm who changed what, and when — Search the audit logs.