List group user memberships
Log in to add to favouritesListing the users that are members of groups can be achieved 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);