Get User
Table of Contents
Overview
The zoho.one.getUser task is used to fetch a user with their ID within an organization.
Syntax
response = zoho.one.getUser(<orgID>, <userID>, <queryParams>, <connectionName>);
Scope
ZohoOne.Users.READ
where:
Parameter | Description | Data type |
response | is the variable that will hold the details of the users fetched from the organization. | KEY-VALUE |
<orgID> | is the ID of the organization from which the users need to be fetched. | NUMBER |
<queryParams> | is the variable that holds the query parameters.
| KEY-VALUE |
<connectionName> | is the name of the Zoho One connection. | TEXT |
<userID> | is the ID of the user that needs to be fetched. | NUMBER |
Supported Includes:
Parameters | Description |
address | Including address in the fetch call will return the user's full address along with other details in the response. |
custom_fields | Used to retrieve custom field data as part of the user's details. |
user.location | Used to fetch user's location details in the response. |
emails | Including emails will provide information, such as primary and secondary email addresses of the user. |
user.extendedinfo | Use extendedinfo to fetch additional information of the user like date of birth, designation, and date of joining. |
user.departmentinfo | Include departmentinfo to retrieve department details as part of the user's information. |
Example 1
response = zoho.one.getUser(72XXXXXXX, 1510XXXXXXXX, Map(), "zoho_one_connection");
where:
response
72XXXXXXX
queryParams
zoho_one_connection
1510XXXXXXXX
Example 2
queryParams = Map(); include = []; include.add("address"); include.add("custom_fields"); include.add("emails"); include.add("user.location"); include.add("user.extendedinfo"); queryParams.put("include", include); response = zoho.one.getUser(72XXXXXXX, 1510XXXXXXXX, queryParams, "zoho_one_connection")
where:
"address", "custom_fields", "emails", "user.location", and "user.extendedinfo".
Response format
{
"status_code": 200,
"users": {
"address": [
{
"address_type": 1,
"city": “****”,
"country": “**”,
"country_display_name": “*****”,
"extension": “2***”,
"mobile": “99*******”,
"phone": “89*******”,
"postal_code": “66*****”,
"seating_location": “O****”,
"state": “******”,
"street_address": “***”
}
],
"country_code": "gb",
"customFields": [
{
"field_id": "79***********",
"field_name": "BLOOD-GROUP",
"field_value": “**”
},
{
"field_id": "79***********",
"field_name": "Height",
"field_value": ***
}
],
"designation_id": "71******”,
"display_name": “ki******”,
"emails": [
{
"email_id": “ki******@*******.***”,
"is_primary": true,
"is_verified": true
}
],
"employee_id": “3****”,
"first_name": “Ki******",
"full_name": "ki******",
"gender": "M",
"is_active": true,
"is_admin": false,
"is_confirmed": true,
"is_invited": false,
"is_joined": false,
"language_code": "en-us",
"last_name": "",
"reportingTo": {
"emails": [
{
"email_id": "na******@*******.***",
"is_primary": true,
"is_verified": true
}
],
"user_id": "79***********",
"zuid": "77*******"
},
"timezone": "Asia/Kolkata",
"user_id": "79**************”,
"user_type": "confirmed",
"zuid": "77*******"
},
"resource_name": "users"
}