Skip to main content

Users.DeleteUserAsync

Description

Deletes an existing User with a specified user Id from the connected Control Room.

Signature [C#]

Task DeleteUserAsync(int userId)

Properties

Input

PropertyDescription
userIdSpecify the user Id to delete.

Remarks

Use DeleteUserAsync API to delete a User with a specified user Id from the connected Control Room.

Example

C#
public void DeleteUser()
{
IControlRoomContext context = LoginControlRoom("RegularBuild", "BasicAuth");
int userId = 1;

Task.Run(() => context.Users.DeleteUserAsync(userId)).Wait();
}
C#
public IControlRoomContext LoginControlRoom()
{
IControlRoomContext context;
string connectionString;

connectionString = "ServerUrl=https://demo.onnitellibuddies.com;UserName=demoadmin;Password=password";
context = new ControlRoomContext(connectionString);

context.Open();
return context;
}