# Retrieves the list of all custom groups Returns details of all custom groups including group ID, name, type (Computers/Users), category (Static/Dynamic/Static Unique), associated domain, and creation/modification timestamps. By default, auto-generated system groups (All Computers, All Users) are excluded. The returned `groupId` values can be passed as `cgId` to [Delete CG](https://www.manageengine.com/products/desktop-central/help/api/cloud/custom-groups-delete-cg.html) or as `groupId` in the request body of [Update Static CG](https://www.manageengine.com/products/desktop-central/help/api/cloud/custom-groups-update-static-cg.html), [Update Static Unique CG](https://www.manageengine.com/products/desktop-central/help/api/cloud/custom-groups-update-static-unique-cg.html), or [Update Dynamic CG](https://www.manageengine.com/products/desktop-central/help/api/cloud/custom-groups-update-dynamic-cg.html). The returned `groupName` values can be used with [Retrieve Custom Group Details](https://www.manageengine.com/products/desktop-central/help/api/cloud/custom-groups-get-cgdetails.html). ## Endpoint `GET /api/1.4/customgroup/getCGList` ## Request ### Request URL `https://`[*{serverurl}*](https://www.manageengine.com/products/desktop-central/help/api/cloud/oauth-authentication-endpoint-domain.html)`/api/1.4/customgroup/getCGList` ### Scope `DesktopCentralCloud.Common.READ` ### Header `Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52` ### Request Parameters #### Request Headers - **Accept** (`string`, Mandatory): `application/json` - Must be `application/json`. Only JSON responses are supported. #### Query Parameters - **isAutoGeneratedCGNeeded** (`boolean`, Optional): Include auto-generated system groups (for example, All Computers and All Users) in the response. Default: `false`. ### Sample Request ```curl curl --request GET \ --url https://appdomains/api/1.4/customgroup/getCGList \ --header 'Accept: application/json' \ --header 'Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52' ``` ## Response Parameters ### HTTP 200 Response body: `application/json` - **message_type** (`string`): Always `getCGList` for this endpoint. - **message_response** (`JSON Object`): Response payload container. - **message_version** (`string`): API version: `1.4`. - **status** (`string`): `success` when the request completed without errors. ### HTTP 204 Response body: `application/json` - **message_type** (`string`): Always `getCGList` for this endpoint. - **message_version** (`string`): API version: `1.4`. - **status** (`string`): Always `error` for error responses. - **error_code** (`string`): Internal error code: `20012` (no custom groups found). - **error_description** (`string`): Human-readable error message. ### HTTP 417 Response body: `application/json` - **message_type** (`string`): Always `getCGList` for this endpoint. - **message_version** (`string`): API version: `1.4`. - **status** (`string`): Always `error` for error responses. - **error_code** (`string`): Internal error code: `20003` (no managed domains). - **error_description** (`string`): Human-readable error message. ### HTTP 500 Response body: `application/json` - **message_type** (`string`): Always `getCGList` for this endpoint. - **message_version** (`string`): API version: `1.4`. - **status** (`string`): Always `error` for error responses. - **error_code** (`string`): Internal error code: `1003` (`INTERNAL_ERROR`). - **error_description** (`string`): Resolved I18N message, typically: An internal error occurred while processing the request. ## Sample Responses ### HTTP 200 List with static, dynamic, static unique computer and user groups. ```json { "message_type": "getCGList", "message_response": { "getcglist": { "response": { "result": { "cg_list": [ { "domain_name": "CORP", "group_category": "Static", "group_id": 301, "group_name": "Windows Servers", "group_modified_on": 1710412000000, "group_created_on": 1710325600000, "group_type": "Computers" }, { "domain_name": "NA", "group_category": "Dynamic", "group_id": 302, "group_name": "Windows 11 PCs", "group_modified_on": 1710500000000, "group_created_on": 1710325600000, "group_type": "Computers" }, { "domain_name": "CORP", "group_category": "Static Unique", "group_id": 303, "group_name": "Finance OU Computers", "group_modified_on": 1710500000000, "group_created_on": 1710240000000, "group_type": "Computers" }, { "domain_name": "CORP", "group_category": "Static", "group_id": 304, "group_name": "HR Users", "group_modified_on": 1710150000000, "group_created_on": 1710150000000, "group_type": "Users" } ] }, "message": "Operation has been completed successfully" }, "operation_status": "success" } }, "message_version": "1.4", "status": "success" } ``` List including auto-generated All Computers group when `isAutoGeneratedCGNeeded=true`. ```json { "message_type": "getCGList", "message_response": { "getcglist": { "response": { "result": { "cg_list": [ { "domain_name": "NA", "group_category": "All Computer/User Group", "group_id": 1, "group_name": "All Computers", "group_modified_on": 1710500000000, "group_created_on": 1700000000000, "group_type": "Computers" }, { "domain_name": "CORP", "group_category": "Static", "group_id": 301, "group_name": "Windows Servers", "group_modified_on": 1710412000000, "group_created_on": 1710325600000, "group_type": "Computers" } ] }, "message": "Operation has been completed successfully" }, "operation_status": "success" } }, "message_version": "1.4", "status": "success" } ``` ### HTTP 204 No manually created custom groups exist in the system. ```json { "error_description": "No custom groups found", "message_type": "getCGList", "error_code": "20012", "message_version": "1.4", "status": "error" } ``` ### HTTP 417 Server has no managed AD/workgroup domains configured. ```json { "error_description": "No managed domain(s) available", "message_type": "getCGList", "error_code": "20003", "message_version": "1.4", "status": "error" } ``` ### HTTP 500 Unexpected server-side failure retrieving custom group list. ```json { "error_description": "An internal error occurred while processing the request.", "message_type": "getCGList", "error_code": "1003", "message_version": "1.4", "status": "error" } ``` ## Rate Limit **Duration:** 1 minute | **Threshold:** 30 | **Lock period:** 5 minutes Duration: Time window for the threshold. Threshold: Number of API calls allowed within the specified duration. Lock Period: Wait time before consecutive API requests.