Skip to main content

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

Gets a group by its id.

Syntax

C#
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

C#
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

C#
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

C#
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

C#
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

C#
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

C#
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

C#
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

C#
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

C#
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

C#
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 group name.

Examples

C#
using Zengenti.Contensis.Management;

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

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

Still need help?

If you still need help after reading this article, don't hesitate to reach out to the Contensis community on Slack or raise a support ticket to get help from our team.
New support request