Returns the hierarchical tree of Active Directory organizational units (OUs), computers, and users for the specified domain. The initial call (no guid) returns domain-level nodes. Expanding a node (with guid) returns child OUs and computer/user leaf members. Used for browsing managed AD domain structure. Supports filtering by domain, GUID, AD level, and group type/category.
get /api/1.4/customgroup/ouTree
https://{serverurl}/api/1.4/customgroup/ouTree
Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52
Must be application/json. Only JSON responses are supported.
Group category context for computer filtering when expanding an AD OU: 1=Static, 2=Dynamic, 5=Static Unique. Used to filter unmanaged computers; does not change category-level visibility of OUs. Ignored for the root-domain list.
Branch the leaf-node query when expanding an AD OU: 1=Computers (returns computers under the OU), any other value (e.g., 2=Users) returns AD users. Ignored for the root-level domain list.
NetBIOS name of the AD domain (or workgroup) to expand. Omit (along with guid) to retrieve the root-level managed-domain list. When provided, guid must also be provided to expand a specific node.
GUID of the AD OU/container/domain to expand. Omit (or omit domainName) to get the root list of managed domains. Required together with domainName for any node expansion. For AD root expansion, pass the domain GUID.
AD hierarchy depth. Pass 'all' (or any string starting with 'all') to retrieve the entire subtree under the given guid. Any other value (or omitted) returns only immediate children. Default: immediate children only.
Whether the specified domain is an AD domain (true) or a workgroup (false). Used when expanding a specific node (both domainName and guid must be supplied together). Default: false. For workgroup expansion, child expansion lists managed resources directly.
curl --request GET \
--url https://appdomains/api/1.4/customgroup/ouTree \
--header 'Accept: application/json' \
--header 'Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52'Always 'ouTree' for this endpoint.
Response payload container.
Response payload.
Flat list of tree nodes with id/parent hierarchy. Parent references build the tree client-side.
Unique identifier for this node in the tree (typically the GUID or a synthetic ID).
ID of the parent node. '--' for root-level domain/workgroup nodes; parent GUID for child OU/computer/user nodes.
Display name of the AD object: domain NetBIOS name or OU name.
NetBIOS domain this object belongs to.
Node type as numeric string: '5'=Domain, '6'=OU, '1'=Computer (leaf), '2'=User (leaf).
Active Directory GUID for this node. '--' for workgroup nodes.
Full LDAP distinguished name (e.g., 'OU=Finance,DC=corp,DC=local'). Present for AD domain nodes (auto-derived from AD domain name) and OU nodes. Absent for workgroup and computer/user leaf nodes.
[Domain-level nodes only] Whether this domain is an Active Directory domain (true) or a workgroup (false). Not present on child OU/computer/user nodes.
[Computer leaf nodes only] OS platform identifier (e.g., 1=Windows, 2=Mac, 3=Linux). Present only when targetType is Computer.
UI state properties for the tree node.
Whether this node is pre-selected in the tree UI.
Whether this node can be selected.
Whether this node has children that can be expanded.
API version: '1.4'.
'success' when the request completed without errors.
Always 'ouTree' for this endpoint.
API version: '1.4'.
Always 'error' for error responses.
Internal error code: '1003' (INTERNAL_ERROR).
Resolved I18N message, typically: An internal error occurred while processing the request.
Root call to /ouTree (no domainName, no guid) returns the managed-domain list. AD domains have targetType=5 with isAdDomain=true and a synthesised distinguishedName. Child OUs/computers/users are fetched in a follow-up call with that domain's guid; this example interleaves them for illustration. targetType uses Resource constants: 5=Domain, 6=OU/Container, 1=Computer (leaf), 2=User (leaf). Root parent is '--'.
{
"message_type": "ouTree",
"message_response": {
"outree": {
"targets": [
{
"isAdDomain": true,
"parent": "--",
"domainName": "CORP",
"guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"distinguishedName": "DC=corp,DC=local",
"targetType": "5",
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"label": "CORP",
"properties": {
"expandable": true,
"selectable": false,
"isSelected": false
}
},
{
"parent": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"domainName": "CORP",
"guid": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"distinguishedName": "OU=Finance,DC=corp,DC=local",
"targetType": "6",
"id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"label": "Finance",
"properties": {
"expandable": true,
"selectable": true,
"isSelected": false
}
},
{
"parent": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"domainName": "CORP",
"guid": "d4e5f6a7-b8c9-0123-defa-234567890123",
"distinguishedName": "OU=Engineering,DC=corp,DC=local",
"targetType": "6",
"id": "d4e5f6a7-b8c9-0123-defa-234567890123",
"label": "Engineering",
"properties": {
"expandable": false,
"selectable": true,
"isSelected": false
}
}
]
}
},
"message_version": "1.4",
"status": "success"
}
Workgroup domain tree (isAdDomain=false) with no OU hierarchy. Workgroup nodes lack distinguishedName.
{
"message_type": "ouTree",
"message_response": {
"outree": {
"targets": [
{
"isAdDomain": false,
"parent": "--",
"domainName": "WORKGROUP",
"guid": "",
"targetType": "5",
"id": "12345",
"label": "WORKGROUP",
"properties": {
"expandable": true,
"selectable": true,
"isSelected": false
}
}
]
}
},
"message_version": "1.4",
"status": "success"
}
Expanding a specific OU by guid parameter to load its child OUs.
{
"message_type": "ouTree",
"message_response": {
"outree": {
"targets": [
{
"parent": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"domainName": "CORP",
"guid": "c3d4e5f6-a7b8-9012-cdef-123456789012",
"distinguishedName": "OU=Finance-Workstations,OU=Finance,DC=corp,DC=local",
"targetType": "6",
"id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
"label": "Finance-Workstations",
"properties": {
"expandable": false,
"selectable": true,
"isSelected": false
}
},
{
"parent": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"domainName": "CORP",
"guid": "f7a8b9c0-d1e2-3456-abcd-678901234567",
"distinguishedName": "OU=Accounting,OU=Finance,DC=corp,DC=local",
"targetType": "6",
"id": "f7a8b9c0-d1e2-3456-abcd-678901234567",
"label": "Accounting",
"properties": {
"expandable": false,
"selectable": true,
"isSelected": false
}
}
]
}
},
"message_version": "1.4",
"status": "success"
}
Unexpected server-side failure retrieving OU tree.
{
"error_description": "An internal error occurred while processing the request.",
"message_type": "ouTree",
"error_code": "1003",
"message_version": "1.4",
"status": "error"
}
![]()
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.
© 2026, Zoho Corporation Pvt. Ltd. All Rights Reserved.