Retrieves a list of all organizational units for an account.
HTTP request
GET https://admin.googleapis.com/admin/directory/v1/customer/{customerId}/orgunits
The URL uses gRPC Transcoding syntax.
Path parameters
| Parameters | |
|---|---|
customerId
|
The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the |
Query parameters
| Parameters | |
|---|---|
orgUnitPath
|
The full path to the organizational unit or its unique ID. Returns the children of the specified organizational unit. |
type
|
Whether to return all sub-organizations or just immediate children. |
Request body
The request body must be empty.
Response body
If successful, the response body contains data with the following structure:
| JSON representation |
|---|
{
"kind"
:
string
,
"etag"
:
string
,
"organizationUnits"
:
[
{
object (
|
| Fields | |
|---|---|
kind
|
The type of the API resource. For Org Unit resources, the type is |
etag
|
ETag of the resource. |
organizationUnits[]
|
A list of organizational unit objects. |
Authorization scopes
Requires one of the following OAuth scopes:
-
https://apps-apis.google.com/a/feeds/policies/ -
https://www.googleapis.com/auth/admin.directory.orgunit -
https://www.googleapis.com/auth/admin.directory.orgunit.readonly
For more information, see the Authorization guide .
Type
| Enums | |
|---|---|
ALL
|
All sub-organizational units. |
CHILDREN
|
Immediate children only (default). |
ALL_INCLUDING_PARENT
|
All sub-organizational units and the specified organizational unit (root if not specified). |

