# Manage Groups

This module is used to manage Authing groups, and can perform operations such as group addition, deletion, modification, group addition/deleting users, group addition/deletion strategies, etc.

# Create group

GroupsManagementClient().create(code, name, description)

Create group

# Parameters

  • code <string> group unique identifier
  • name <string> group name
  • description <string> description

# Example

var list = await managementClient.Groups.Create(code, "name");

# Delete group

GroupsManagementClient().delete(code)

Delete group

# Parameters

  • code <string> group unique identifier

# Example

var message = await managementClient.Groups.Delete(code);

# Modify group

GroupsManagementClient().update(code, input)

Modify group

# Parameters

  • code <string> group unique identifier
  • input <Object>
  • input.name <string> new name
  • input.description <string> new description information
  • input.newCode <string> New unique identifier

# Example

var group = await client.Groups.Update(code, description: "asd");

# Get group details

GroupsManagementClient().detail(code)

Get group details

# Parameters

  • code <string> group unique identifier

# Example

var policy = await managementClient.Groups.Update(code, description: "asd");

# Get group list

GroupsManagementClient().list(page, limit)

Get group list

# Parameters

  • page <number> Page number The default value is: 1.
  • limit <number> Number per page The default value is 10.

# Example

var list = await managementClient.Groups.List();

# Batch delete groups

GroupsManagementClient().deleteMany(codeList)

Batch delete groups

# Parameters

  • codeList <string[]> group unique identifier list

# Example

var message = await managementClient.Groups.DeleteMany(new string[] {code });

# Get the list of grouped users

GroupsManagementClient().listUsers(code, page, limit)

Get grouped user list

# Parameters

  • code <string> group unique identifier
  • page <number> Page number The default value is: 1.
  • limit <number> Number per page The default value is 10.

# Example

var users = managementClient.Groups.ListUsers(code);

# Add user

GroupsManagementClient().addUsers(code, userIds)

Add user

# Parameters

  • code <string> group unique identifier
  • userIds <string[]> list of user IDs

# Example

await managementClient.Groups.AddUsers(code, new string[] {userId1, userId2 });

# Remove user

GroupsManagementClient().removeUsers(code, userIds)

Remove user

# Parameters

  • code <string> group unique identifier
  • userIds <string[]> list of user IDs

# Example

await managementClient.Groups.RemoveUsers(code, new string[] {userId1, userId2 });