Associated Groups of a User
Purpose
To get the groups that a user is associated with.
Endpoints
- GET /users/{user_ID}/actions/associated_groups
Request Details
Request URL
{api-domain}/crm/{version}/users/{user_ID}/actions/associated_groups
Header
Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52
Scope
scope=ZohoCRM.settings.user_groups.ALL/READ
(and)
scope=ZohoCRM.users.ALL/READ
Parameters
- pageinteger, optionalThe page number from which you want to fetch the records. The default value is 1. 
- per_pageinteger, optionalThe number of records you want to fetch per page. You can choose a value between 1 and 200. The default and maximum value is 200. 
- includestring, optionalSpecify the "include" parameter to know the sources available in a group a user is associated with. 
Sample Request
Copiedcurl "https://www.zohoapis.com/crm/v8/users/3652397000000186017/actions/associated_groups"
-X GET
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"Response JSON
- created_timeThe date and time in the ISO8601 format at which the group was created. 
- modified_timeThe date and time in the ISO8601 format at which the group was modified last. 
- nameThe name of the group that the user is associated with. 
- modified_byThe name and ID of the user who last modified the details of the group. 
- descriptionThe description of the group. 
- idThe unique ID of the group. 
- created_byThe name and ID of the user who created the group. 
- infoContains the following details: - per_page - the maximum number of records that can be fetched per API call. The value is 200.
- page - the page number from which the records are fetched in current API call.
- count - the number of records that were fetched in the API call.
- more_records - Represents if there are more records that can be fetched.
 
Possible Errors
- NO_CONTENTHTTP 204There are no groups associated to that user. 
 Resolution: Associate the user to one or more groups before trying this API.
- INVALID_DATAHTTP 400The user ID is invalid. 
 Resolution: Use the Get Users API to get the ID of the user.
Sample Response
Copied{
    "user_groups": [
        {
            "created_time": "2023-06-06T07:58:32+05:30",
            "modified_time": "2023-06-06T08:03:40+05:30",
            "name": "Tier1",
            "modified_by": {
                "name": "Patricia Boyle",
                "id": "3652397000000186017"
            },
            "description": null,
            "id": "3652397000012454002",
            "created_by": {
                "name": "Patricia Boyle",
                "id": "3652397000000186017"
            }
        }
    ],
    "info": {
        "per_page": 200,
        "count": 1,
        "page": 1,
        "more_records": false
    }
}