Skip to main content

Users.UpdateUserInfoAsync

Description

Updates the specified UserInfo details inside the connected Control Room.

Signature [C#]

Task UpdateUserInfoAsync(UserInfo userInfo)

Properties

Input

PropertyDescription
UserInfoSpecify the update detail of a user.

Remarks

Use UpdateUserInfoAsync API to update specified User information inside the Control Room.

Example

C#
public void UpdateUserInfo())
{
IControlRoomContext context = LoginControlRoom("RegularBuild", "BasicAuth");
string updateUserName = "updateUser";
string updateFirstName = "updateTest";
string updateLastName = "updateUser";

List<Role> roles = new List<Role>();
Role role = new Role();
role.RoleId = 1;
roles.Add(role);

UserInfo userInfo = new UserInfo()
{
UserId = 1,
UserName = updateUserName,
FirstName = updateFirstName,
LastName = updateLastName,
EmailAddress = "ibqa@vitinfotech.com",
isEnabled = true,
roles = roles,
};

Task.Run(() => context.Users.UpdateUserInfoAsync(userInfo)).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;
}