You can use the getUsers method to get the list of users in your organization.
XML Format:
https://crm.zoho.com/crm/private/xml/Users/getUsers?authtoken=Auth Token&scope=crmapi&type=The Type of User
JSON Format:
https://crm.zoho.com/crm/private/json/Users/getUsers?authtoken=Auth Token&scope=crmapi&type=The Type of User
Parameter | Data Type | Description |
authtoken* | String | Encrypted alphanumeric string to authenticate your Zoho credentials. |
scope* | String | Specify the value as crmapi. |
newFormat | Integer | newFormat=1: To exclude fields with "null" values while inserting data from your CRM account. newFormat=2: To include fields with "null" values while inserting data from your CRM account. |
version | Integer | version = 1: (Default value) This will fetch responses based on the earlier API implementation i.e prior to the enhancements made. version = 2: This will fetch responses based on the latest API implementation. |
type* | String | This parameter takes one of the following values: AllUsers To list all users in your organization (both active and inactive users) ActiveUsers To get the list of all Active Users DeactiveUsers To get the list of all users who were deactivated AdminUsers To get the list of all users with the Administrative privileges ActiveConfirmedAdmins To get the list of users with the administrative privileges and are also confirmed |
* - Mandatory parameter
Note:
In this case, type = AllUsers
<users>
<user id="501240000000541313" email="andrew@zohocorp.com" role="CEO" profile="Administrator" status="active" confirm="true">andrew</user>
<user id="501234132412341135" email="tyson@zohocorp.com" role="Manager" profile="Standard" status="active" confirm="true">tyson</user>
<user id="501234565431234521" email="kelly@zohocorp.com" role="Manager" profile="Standard" status="active" confirm="false">kelly</user>
<user id="512343454676898643" email="frank@zohocorp.com" role="CEO" profile="Standard" status="active" confirm="false">frank</user>
<user id="512445678909865545" email="sophia@zohocorp.com" role="CEO" profile="Administrator" status="active" confirm="true">sophia</user>
</users>
If version = 2, you will get org id in the response. However, company details should be available in your CRM records to get org id in the response.
<users orgid="501240000000652982">
<user id="501240000000541313" zuid="11381966" website="null" mobile="888-555-2146" fax="null" street="null" city="null" state="null" country="null" zip="null" language="en_US" timezone="PST8PDT" email="andrew@zohocorp.com" role="CEO" profile="Administrator" status="active" confirm="true">andrew</user>
<user id="512445678909865545" zuid="11385946" website="null" mobile="null" fax="null" street="null" city="null" state="null" country="null" zip="null" language="en_US" timezone="America/Los_Angeles" email="sophia@zohocorp.com" role="CEO" profile="Administrator" status="active" confirm="true">sophia</user>
</users>