Get User
Table of Contents
Note:
- This task is applicable to all services except Zoho Creator.
- Each time the zoho.one.getUser integration task is executed, it triggers an API request in the back-end. This call is deducted from the external calls limit available for the service from which the task is executed, based on your pricing plan.
- Only actual executions that receive a response (whether success or failure) are counted, not the number of times the task appears in the script. For example, if zoho.one.getUser integration task is placed inside a for each task that iterates five times, the number of external calls consumed will be five, even though the task appears only once in the script.
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.READwhere:
| 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:
response72XXXXXXXqueryParamszoho_one_connection1510XXXXXXXXExample 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"
}