Choose where you’d like to start

Update User

Table of Contents

Overview

The zoho.one.updateUser task is used to update the details of a user with new values in an organization.

Syntax

<response> = zoho.one.updateUser(<orgID>, <userID>, <userData>, <connection>);

Scope

ZohoOne.Users.UPDATE

where:

ParameterDescriptionData type
responseis the variable that will hold the details of the user whose details needs to be updated.KEY-VALUE
<orgID>is the ID of the organization in which the user details needs to be updated.NUMBER
<userID>is the ID of the user whose details needs to be updated.NUMBER
<userData>

is the variable that will hold the user data. The supported user data that can be included are 

  • first_name
  • last_name
  • employee_id
  • designation_id
  • department_id
  • reporting_to
  • work_location
  • language_code
  • country
  • timezone
  • date_of_birth
  • gender
  • date_of_joining
  • seating_location
  • street_address
  • city
  • state
  • postal_code
  • extension
  • mobile
  • phone
     
KEY-VALUE
<connection>is the name of the Zoho One connection.TEXT

Example

The following script updates a user with ID - 1510XXXXXXXX with user data like gender, email ID, designation ID, and language in Zoho One organization with ID - 72XXXXXXX:

userData = Map();
userData.put("gender", "M");
userData.put("designation_id", "48XXXXXX");
userData.put("language_code", "en");
response = zoho.one.updateUser(72XXXXXXX, 1510XXXXXXX ,userData, "zoho_one_connection")

where:

response
This is the KEY-VALUEresponse returned by Zoho One.
72XXXXXXX
This is the NUMBERthat represents the organization ID of Zoho One account.
zoho_one_connection
This is the TEXTthat represents the link name of the connection.
1510XXXXXXX
This is the NUMBERthat represents the user ID whose details needs to be updated.
M
This is the This is the GENDERof the user to be updated.
48XXXXXX
This is the This is the DESIGNATION ID of the user to be updated.
en
is the This is the LANGUAGE CODE of the user to be updated.

Response format

{
   "status_code": 200,
   "resource_name": "users",
   "message": "Profile has been updated successfully.",
   "users": {
       "address": [
           {
               "street_address": "Test",
               "country": "in",
               "extension": "1234",
               "address_type": 1,
               "phone": "98********",",
               "city": "Test",
               "seating_location": "Floor 1 - 2B",
               "mobile": "98********",
               "state": "test",
               "postal_code": "test"
           }
       ],
       "gender": "F",
       "department_id": "63******",
       "timezone": "Asia/Kolkata",
       "customFields": [
           {
               "field_id": "141********",
               "field_value": "A"
           }
       ],
       "date_of_birth": 1362096000000,
       "designation_id": "72******",
       "last_name": "User1",
       "reporting_to": "1494***********",
       "work_location": "location1",
       "zuid": "84185086",
       "language_code": "en",
       "employee_id": "1234444",
       "date_of_joining": 1709251200000,
       "href": "https://one.zoho.com/api/v1/orgs/72*******/users/1510*********",
       "first_name": "confirmed1"
   }
}

Get Started Now

Execute