List group's members

get
https://api.box.com/2.0
/groups/:group_id/memberships

Retrieves all the members for a group. The user must have admin permissions to inspect enterprise's groups.

Request

application/json

Path Parameters

stringin pathrequired
57645

The ID of the group.

Query Parameters

integer / int64in queryoptional
10001000-1000

The maximum number of items to return per page.

integer / int64in queryoptional
10000

The offset of the item at which to begin the response.

Response

application/jsonMemberships

Returns a collection of membership objects. If there are no memberships, an empty collection will be returned.

You can now try out some of our APIs live, right here in the documentation.
Log In

Request Example

cURL
curl -X GET https://api.box.com/2.0/groups/57645/memberships \
     -H "Authorization: Bearer <ACCESS_TOKEN>"
.NET
BoxCollection<BoxGroupMembership> memberships = await client.GroupsManager
    .GetAllGroupMembershipsForGroupAsync("11111");
Java
BoxGroup group = new BoxGroup(api, id);
Iterable<BoxGroupMembership.Info> memberships = group.getAllMemberships();
for (BoxGroupMembership.Info membershipInfo : memberships) {
    // Do something with the membership.
}
Python
group_memberships = client.group(group_id='11111').get_memberships()
for membership in group_memberships:
    print('{0} is a {1} of the {2} group'.format(membership.user.name, membership.role, membership.group.name))
Node
client.groups.getMemberships('11111')
	.then(memberships => {
		/* memberships -> {
			total_count: 2,
			entries: 
			[ { type: 'group_membership',
				id: '44444',
				user: 
					{ type: 'user',
					id: '22222',
					name: 'Alice',
					login: 'alice@example.com' },
				group: { type: 'group', id: '11111', name: 'Employees' },
				role: 'member' },
				{ type: 'group_membership',
				id: '55555',
				user: 
					{ type: 'user',
					id: '66666',
					name: 'White Rabbit',
					login: 'rabbit@example.com' },
				group: { type: 'group', id: '11111', name: 'Employees' },
				role: 'member' } ],
			offset: 0,
			limit: 100 }

		*/
	});

Response Example

{
  "total_count": 5000,
  "limit": 1000,
  "offset": 2000,
  "order": [
    {
      "by": "type",
      "direction": "ASC"
    }
  ],
  "entries": [
    {
      "id": 11446498,
      "type": "group_membership",
      "user": {
        "id": 11446498,
        "type": "user",
        "name": "Aaron Levie",
        "login": "ceo@example.com"
      },
      "group": {
        "id": 11446498,
        "type": "group",
        "name": "Support",
        "group_type": "managed_group"
      },
      "role": "member",
      "created_at": "2012-12-12T10:53:43-08:00",
      "modified_at": "2012-12-12T10:53:43-08:00"
    }
  ]
}