setUser_v2
Updates the properties of a user in the company hierarchy. In the Rescue Administration Center, select a user to modify its properties. For information about how to modify user details in the Rescue Administration Center, see Setting up Your Organization in the LogMeIn Rescue Administration Center User Guide.
Changes in Version 2 of setUser
The following have been introduced in the setUser_v2 method:
- rpataddon has been added as new input parameter.
- INVALIDPARAM_RPATADDON, INVALID_SECRETAUTHCODE, and USER_DELETED_OR_DISABLED have been added as new return values.
Input Parameters
Element | Description |
---|---|
node | The ID of the parent user. Required. |
name | The name of the user. Required. |
nick | The nick of the user. Optional. |
The email address of the user. Required. | |
ssoid | The Single Sign On ID of the user. Optional. |
pwd | The password of the user. Optional. |
confpwd | The confirmation password. Optional. |
oldpwd | The old password of the user. Optional. |
status | The status of the user. Required.
The possible values are as follows:
|
description | The description of the user. Optional. |
mobileaddon | Specifies whether the user has mobile
addon. Required.
The possible values are as follows:
|
rpataddon | Specifies whether the user has RPAT addon.
Required.
The possible values are as follows:
|
authcode | The secret authentication code that is used to authenticate the user without logging in to Rescue. Optional. |
Return Values
Displayed Return Value | Description |
---|---|
ERROR | An unspecified error occurred, such as timeout. |
OK | Updating user properties succeeded. |
NOTLOGGEDIN | Updating user properties failed because the current user is no longer logged in. |
INVALIDPARAM_NODE | The specified ID is either not the ID of a user node or does not exist. |
INVALIDPARAM_NAME | The name is too long or the field is empty. |
INVALIDPARAM_STATUS | The specified status is incorrect or does not exist. |
INVALIDPARAM_MOBILEADDON | The mobile addon of the user is incorrectly specified. |
INVALIDPARAM_EMAIL | The email address of the use has an incorrect format. |
INVALIDPARAM_EMAIL_ALREADY_IN_USE | The specified email address is already in use. |
INVALIDPARAM_MISSING_CURRENT_PASSWORD | The current password is not defined. This error only occurs if a Master administrator updates his own user properties. |
INVALIDPARAM_PASSWORD_CANNOT_CONTAIN_ WHITESPACE_CHARACTERS | One of the password fields contain an extra space. |
INVALIDPARAM_PASSWORD_HAS_TO_BE_AT_LEAST_ 8_CHARACTERS_LONG | The new password must be at least 8 characters in length. |
INVALIDPARAM_PASSWORD_HAS_TO_CONTAIN_AT_LEAST_ TWO_UPPERCASE_LETTERS_OR_SPECIAL_CHARACTERS | The new password must contain at least 2 characters that are either uppercase or special characters. |
INVALIDPARAM_PASSWORD_LENGTH_HAS_TO_BE_BIGGER_ THAN_ZERO | The password fields cannot be empty. |
INVALIDPARAM_PASSWORD_DOES_NOT_MEET_THE_MINIMUM_ PASSWORD_STRENGHT_REQUIREMENTS | The Password Strength meter must meet the pre-defined minimum requirements. |
INVALIDPARAM_NEW_PASSWORDS_DO_NOT_MATCH | The new and the confirmation passwords do not match. |
INVALIDPARAM_CURRENT_AND_NEW_PASSWORD_MATCH | The current and the new passwords cannot match. |
INVALIDPARAM_CURRENT_PASSWORD_IS_WRONG | The current password of the user is incorrect. |
INVALIDPARAM_MISSING_CONFIRMATION_PASSWORD | The confirmation password field cannot be empty. |
NOT_ENOUGH_SEAT_LICENSES_AVAILABLE | There are not enough standard, mobile, or RPAT licenses available. |
NODE_CANNOT_BE_ENABLED_BECAUSE_ITS_PARENT_NODE_ IS_DISABLED | The status of the user cannot be set to enabled because the parent node is disabled. |
INVALIDPARAM_RPATADDON | The RPAT addon of the user is incorrectly specified. |
INVALID_SECRETAUTHCODE | The secret authentication code for the user is invalid. |
USER_DELETED_OR_DISABLED | The user is deleted or disabled. |
Sample Code
The following are examples for using the setUser_v2 method that you can call in your environment.
HTTP GET
https://secure.logmeinrescue.com/API/setUser_v2.aspx?node=337366&name=John Doe&nick=JDoe
&email=jdoe@company.com&ssoid=123456&pwd=secretPassword&confpwd=secretPassword
&oldpwd=oldPassword&status=enabled&description=Admin&addons=true&rpataddon=false
&authcode=4ahx...80u0
HTTP POST
<form method="post" action="https://secure.logmeinrescue.com/API/setUser_v2.aspx">
<input name="node" value="337366">
<input name="name" value="John Doe">
<input name="nick" value="JDoe">
<input name="email" value="jdoe@company.com">
<input name="ssoid" value="123456">
<input name="pwd" value="secretPassword">
<input name="confpwd" value="secretPassword">
<input name="oldpwd" value="oldPassword">
<input name="status" value="enabled">
<input name="description" value="Admin">
<input name="addons" value="true">
<input name="rpataddon" value="false">
<input name="authcode" value="4ahx...80u0">
</form>
C# with SOAP
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using apiSamples.WebServiceClients;
namespace apiSamples
{
public partial class SOAP : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
try
{
//Set up proxy
WebServiceClients.API proxy = new WebServiceClients.API();
string sEmail = "some@email.com";
string sPwd = "secretPassword";
int iNode = [Node ID of user being modified];
string sName = "Name of user";
string sNick = "Nick name of user";
string sTechEmail = "Email address of user";
string sSSOID = "Single Sign On ID of user";
string sTechPwd = "New password";
string sConfPwd = "Password confirmation";
string sOldPwd = "Old password";
string sDescr = "Description of user";
string sAuthCode = "4ahx...80u0";
//Login
WebServiceClients.loginRet loginResult = proxy.login(sEmail, sPwd);
Response.Write(loginResult + "<br />");
WebServiceClients.setUserRet_v2 setUserReturn = proxy.setUser_v2(iNode, sName,
sNick, sTechEmail, sSSOID, sTechPwd, sConfPwd,
sOldPwd, nodeStatus.Enabled, sDescr,
hasMobileAddon.True, true, sAuthCode);
Response.Write(setUserReturn + "<br />");
}
catch (Exception ex)
{
lblError.Text = ex.Message;
}
}
}
}