---
updatedAt: 2026-07-10T17:11:53.000Z
---

# Search for OUs in a given OU

List all OUs that exist in a given container. If provided a cookie with key 'browseoupagingcookie'
will be used to retrieve additional pages of data from the directory connection.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "description": "This API provides access to control BeyondTrust software for Endpoint Privilege Management Linux.",
    "title": "Endpoint Privilege Management Linux API",
    "version": "25.1.6"
  },
  "security": [
    {
      "nomine-authorizer": []
    }
  ],
  "paths": {
    "/api/directoryservices/{id}/ous": {
      "get": {
        "description": "List all OUs that exist in a given container. If provided a cookie with key 'browseoupagingcookie'\nwill be used to retrieve additional pages of data from the directory connection.",
        "tags": [
          "DirectoryServices",
          "saas"
        ],
        "summary": "Search for OUs in a given OU",
        "operationId": "getDirectoriesOUs",
        "parameters": [
          {
            "x-go-name": "ID",
            "description": "The ID for the requested resource",
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "x-go-name": "DN",
            "description": "The DN of the containing OU",
            "name": "dn",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/getDirectoriesOUs"
          },
          "400": {
            "$ref": "#/components/responses/TextError"
          }
        },
        "x-amazon-apigateway-integration": {
          "type": "aws_proxy",
          "httpMethod": "POST",
          "uri": "${biulInvocationArn}"
        }
      }
    }
  },
  "components": {
    "responses": {
      "TextError": {
        "description": "TextError An unknown error occurred, details provided in body"
      },
      "getDirectoriesOUs": {
        "description": "GetDirectoriesOUs is an API response model",
        "content": {
          "application/json": {
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/OUResult"
              },
              "maxItems": 500
            }
          }
        }
      }
    },
    "schemas": {
      "OUResult": {
        "description": "OUResult represents a result Organizational Unit",
        "type": "object",
        "properties": {
          "dn": {
            "type": "string",
            "x-go-name": "DN"
          },
          "guid": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "uint8"
            },
            "x-go-name": "ObjectGUID",
            "maxItems": 500
          },
          "ou": {
            "type": "string",
            "x-go-name": "OU"
          }
        },
        "x-go-package": "pbsmc/remote/directory"
      }
    },
    "securitySchemes": {
      "nomine-authorizer": {
        "type": "apiKey",
        "name": "Authorization",
        "in": "header",
        "x-amazon-apigateway-authtype": "custom",
        "x-amazon-apigateway-authorizer": {
          "type": "request",
          "authorizerUri": "${authorizerInvokeArn}",
          "authorizerResultTtlInSeconds": 300,
          "identitySource": "method.request.header.Authorization"
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://api.beyondtrust.io/site/{siteid}/epm/linux"
    }
  ],
  "x-readme": {}
}
```