groups.findAll()

Retrieves all groups that the user belongs to, across all organizations.

Definition

client.groups.findAll(
options: ?Object
):Promise<Group,Error>

Options

ParameterTypeDescription
includeMembers?boolWhether to ensure that User objects are fully loaded for all group members (default: false)

Returns

Once the returned Promise is resolved, you will have access to an array of Groups.

Example

const groups = await client.groups.findAll();
console.log('found groups:', groups.map(({ displayName }) => displayName));