Skip to main content
Browse Documentation

Getting a group

Created by Mike Andrews on 09 Jun 2020

Requesting an individual group can be achieved by using one of the Get methods overloads.

Gets a group by its id.

Syntax

public Group Get(Guid id)
{    
}

Parameters

id

Type: Guid
The id of the group.

Remarks

Returns null if no group matches the specified id.

Examples

using Zengenti.Contensis.Management;

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

// Mimic a guid value
var groupId = Guid.Parse("c5da1719-cb3f-4f2e-927b-f678293258f3");

// Get the group
Group group = client.Security.Groups.Get(groupId);

Gets a group by its id asynchronously.

Syntax

public async Task<Group> GetAsync(Guid id)
{    
}

Parameters

id

Type: Guid
The id of the group.

Remarks

Returns null if no group matches the specified id.

Examples

using Zengenti.Contensis.Management;

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

// Mimic a guid value
var groupId = Guid.Parse("c5da1719-cb3f-4f2e-927b-f678293258f3");

// Get the group
Group group = await client.Security.Groups.GetAsync(groupId);

Gets a group by its id.

Syntax

public Group Get(string id)
{    
}

Parameters

id

Type: string
The group identifier, either group name, or identifier.

Remarks

Returns null if no group matches the specified id.

Examples

using Zengenti.Contensis.Management;

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

// Get the group
Group group = client.Security.Groups.Get("c5da1719-cb3f-4f2e-927b-f678293258f3");

Gets a group by its id asynchronously.

Syntax

public async Task<Group> GetAsync(string id)
{    
}

Parameters

id

Type: string
The groups identifier, either group name, or identifier.

Remarks

Returns null if no group matches the specified id.

Examples

using Zengenti.Contensis.Management;

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

// Get the group
Group group = await client.Security.Groups.GetAsync("c5da1719-cb3f-4f2e-927b-f678293258f3");

Gets a group by its name.

Syntax

public Group Get(string id)
{    
}

Parameters

id

Type: string
The group identifier, either group name, or identifier.

Remarks

Returns null if no group matches the specified name.

Examples

using Zengenti.Contensis.Management;

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

// Get the group
Group group = client.Security.Groups.Get("Fight Club Members");

Gets a group by its name asynchronously.

Syntax

public async Task<Group> GetAsync(string id)
{    
}

Parameters

id

Type: string
The groups identifier, either group name, or identifier.

Remarks

Returns null if no group matches the specified groupname.

Examples

using Zengenti.Contensis.Management;

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

// Get the group
Group group = await client.Security.Groups.GetAsync("Fight Club Members");