Skip to main content
C#
1
2
3
public void RemoveUser(Guid groupId, Guid userId) { }
C#
1
2
3
4
5
6
7
8
9
10
11
using Zengenti.Contensis.Management; // Create a client var client = ManagementClient.Create(); // Mimic a user and group guid Guid userId = Guid.Parse("3f7e190e-2ea6-4fb2-b0f3-e2ce7a231140"); Guid groupId = Guid.Parse("e65c27e1-211c-4372-874c-458ef28a3e7f"); // Remove the user from the group client.Security.Groups.RemoveUser(groupId, userId);
C#
1
2
3
public async Task RemoveUserAsync(Guid groupId, Guid userId) { }
C#
1
2
3
4
5
6
7
8
9
10
11
using Zengenti.Contensis.Management; // Create a client var client = ManagementClient.Create(); // Mimic a user and group guid Guid userId = Guid.Parse("3f7e190e-2ea6-4fb2-b0f3-e2ce7a231140"); Guid groupId = Guid.Parse("e65c27e1-211c-4372-874c-458ef28a3e7f"); // Remove the user from the group await client.Security.Groups.RemoveUserAsync(groupId, userId);
C#
1
2
3
public void RemoveUser(User user) { }
C#
1
2
3
4
5
6
7
8
9
10
11
12
13
using Zengenti.Contensis.Management; // Create a client var client = ManagementClient.Create(); // Get the group Group group = client.Security.Groups.Get("Fight Club Members"); // Get the user User user = client.Security.Users.Get("t.durden") // Remove the user from the group group.RemoveUser(user);
C#
1
2
3
public async Task RemoveUserAsync(User user) { }
C#
1
2
3
4
5
6
7
8
9
10
11
12
13
using Zengenti.Contensis.Management; // Create a client var client = ManagementClient.Create(); // Get the group Group group = await client.Security.Groups.GetAsync("Fight Club Members"); // Get the user User user = await client.Security.Users.GetAsync("t.durden") // Remove the user from the group await group.RemoveUserAsync(user);

Still need help?

New support request