Skip to main content
Browse Documentation

List group user memberships

Created by Mike Andrews on 14 Jul 2020

Listing the users that are members of groups an be achived by using one of the Users method overloads.

List users that are members of the group.

Syntax

public PagedList<User> List(SecurityListOptions listOptions = null)
{    
}

Parameters

listOptions

Type: SecurityListOptions
The list options, page size, page index, etc.

Examples

using Zengenti.Contensis.Management;
using Zengenti.Data;

// Create a client
var client = ManagementClient.Create();

SecurityListOptions listOptions = new SecurityListOptions 
{
    PageOptions = new PageOptions(0, 10)
};

// Get the group
Group group = client.Security.Groups.Get("System Administrators");

// List the users
PagedList<User> members = group.Users(listOptions);

List users that are members of the group asynchronously.

Syntax

public Task<PagedList<User>> List(SecurityListOptions listOptions = null)
{    
}

Parameters

listOptions

Type: SecurityListOptions
The list options, page size, page index, etc.

Examples

using Zengenti.Contensis.Management;
using Zengenti.Data;

// Create a client
var client = ManagementClient.Create();

SecurityListOptions listOptions = new SecurityListOptions 
{
    PageOptions = new PageOptions(0, 10)
};

// Get the group
Group group = await client.Security.Groups.Get("System Administrators");

// List the users
PagedList<User> members = await group.UsersAsync(listOptions);