Skip to main content
Version: Current

Group.GetUsersByNameAsync

Description​

Gets the list of users associated with the specified group name from the connected AI Command Center.

C#​

Task<IEnumerable<User>> GetUsersByNameAsync(string groupName)

Properties​

Input​

PropertyDescription
groupNameSpecify the group name to retrieve the list of users.

Output​

PropertyDescription
Task<IEnumerable<User>>Returns the collection of users belonging to the specified group.

Remarks​

Use GetUsersByNameAsync API to retrieve all users mapped to a group using the group name.

Example​

C#
public async Task GetUsersByName()
{
IControlRoomContext context = LoginControlRoom("RegularBuild", "BasicAuth");
string groupName = "Finance_Team";

IEnumerable<User> users = await context.Group.GetUsersByNameAsync(groupName);

foreach (var user in users)
{
Console.WriteLine("User Name: " + user.UserName);
}
}