LogMeIn Rescue API User Guide

setUser

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.

Input Parameters

Element Description
node The ID of the parent node. Required.
name The name of the user. Required.
nick The nick of the user. Optional.
email 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:
  • Enabled
  • Disabled
description The description of the user. Optional.
addons Specifies whether the user has mobile addon. Required.
The possible values are as follows:
  • True
  • False
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 when Master administrators update their 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 eight characters in length.
INVALIDPARAM_PASSWORD_HAS_TO_​CONTAIN_AT_LEAST_ TWO_UPPERCASE_LETTERS_OR_SPECIAL_CHARACTERS The new password must contain at least two 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 or mobile 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.
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 method that you can call in your environment.

HTTP GET

https://secure.logmeinrescue.com/API/setUser.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&authcode=4ahx...80u0

HTTP POST

<form method="post" action="https://secure.logmeinrescue.com/API/setUser.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="authcode" value="4ahx...80u0">
</form>

SOAP

For sample SOAP 1.1 and SOAP 1.2 request and response messages, visit https://secure.logmeinrescue.com/api/API.asmx?op=setUser.

PHP with SOAP

The example values shown must be replaced with actual values.

<?php
	$soapclient = new SoapClient("https://secure.logmeinrescue.com/api/api.asmx?wsdl");

	$loginparams = array (
		'sEmail' => 'some@email.com',
		'sPassword' => 'secretPassword'
	);

	$iNodeID = 123456;
	$sName = "John Doe";
	$sNick = "JDoe";
	$sEmail = "jdoe@company.com";
	$sSSOID = "123456";
	$sPwd = "secretPassword";
	$sConfPwd = "secretPassword";
	$sOldPwd = "oldPassword";
	$eStatus = Enabled;
	$sDescription = "Admin";
	$eAddons = true;
	$sAuthCode = "4ahx...80u0";
	
	$setuserparams = array (
		'iNodeID' => $iNodeID,
		'sName' => $sName,
		'sNick' => $sNick,
		'sEmail' => $sEmail,
		'sSSOID' => $sSSOID,
		'sPwd' => $sPwd,
		'sConfPwd' => $sConfPwd,
		'sOldPwd' => $sOldPwd,
		'eStatus' => $eStatus,
		'sDescription' => $sDescription,
		'eAddons' => $eAddons,
		'sAuthCode' => $sAuthCode
	);

	$loginResult = $soapclient->login($loginparams);
	
	print_r($loginResult);

	$setUserResult = $soapclient->setUser($setuserparams);
	
	print_r($setUserResult);
?>

C# with HttpWebRequest

The example values shown must be replaced with actual values.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Net;
using System.IO;

namespace setUser
{
    public partial class _Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
            string sEndpoint = "https://secure.logmeinrescue.com/api/";
            string sEmail = "some@email.com";
            string sPwd = "secretPassword";
            string sNode = "ID of node being updated";
            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 sStatus = "Status of node (Enabled | Disabled)";
            string sDescr = "Description of user";
            string sAddons = "Has mobile addons (True | False)";
            string sAuthCode = "";

            HttpWebRequest oReqLogin = (HttpWebRequest)WebRequest.Create(sEndpoint + 
"login.aspx" + "?email=" + sEmail + "&pwd=" + sPwd);
            oReqLogin.CookieContainer = new CookieContainer();

            HttpWebResponse oRespLogin = (HttpWebResponse)oReqLogin.GetResponse();
            string sRespLogin = new StreamReader(oRespLogin.GetResponseStream()).ReadToEnd();
            Response.Write(sRespLogin + "<br />");

            CookieContainer sessioncookie = oReqLogin.CookieContainer;

            HttpWebRequest oReqSetUser = (HttpWebRequest)WebRequest.Create(sEndpoint + 
"setuser.aspx" + "?node=" + sNode + "&name=" + sName + "&nick=" + sNick + "&email="
 + sTechEmail + "&ssoid=" + sSSOID + "&pwd=" + sTechPwd + "&confpwd=" + sConfPwd + "&oldpwd="
 + sOldPwd + "&status=" + sStatus + "&description=" + sDescr + "&addons=" + sAddons
 + "&authcode=" + sAuthCode);
            oReqSetUser.CookieContainer = sessioncookie;

            HttpWebResponse oRespSetUser = (HttpWebResponse)oReqSetUser.GetResponse();
            string sRespSetUser = new StreamReader(oRespSetUser.GetResponseStream())
.ReadToEnd();
            Response.Write(sRespSetUser + "<br />");
            }
            catch (Exception ex)
            {
                lblError.Text = ex.Message;
            }
        }
    }
}

C# with SOAP

The example values shown must be replaced with actual values.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Net;
using System.IO;
using setUser.WebServiceClients;

namespace setUser
{
    public partial class _Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                string sEndpoint = "https://secure.logmeinrescue.com/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 = "";

                WebServiceClients.API proxy = new WebServiceClients.API();

                WebServiceClients.loginRet loginResult = proxy.login(sEmail, sPwd);
                Response.Write(loginResult + "<br />");

                WebServiceClients.setUserRet setUserReturn = proxy.setUser(iNode, sName,
 sNick, sTechEmail, sSSOID, sTechPwd, sConfPwd, sOldPwd, nodeStatus.Enabled, sDescr,
 hasMobileAddon.True, sAuthCode);
                Response.Write(setUserReturn + "<br />");
            }
            catch (Exception ex)
            {
                lblError.Text = ex.Message;
            }
        }
    }
}