Skip to content

OU Create

Mike Garvey edited this page Apr 21, 2022 · 4 revisions

POST /create/ou

Creates a new Active Directory Organizational Unit with the specified attributes from the request body.

Query Parameters

See create query parameters

Body Syntax

Required Body Parameters

Name Type Enum Values Default Value Description
cn string The common name of the newly created group (without the OU= prefix)
path string The OU (or root) distinguished name where the OU will be created.

Optional Body Parameters

Name Type Enum Values Default Value Description
description string null The description to add to the OU.
protect boolean false Specifies whether the OU should be protected from accidental deletion.

EXAMPLE

{
  "description": "Contains all campus employees.",
  "protect": true,
  "cn": "Campus Employees",
  "path": "OU=AllUsers,DC=contoso,DC=com"
}

Returns

201 Created

{
  "dn": "<DN of the newly created OU>",
  "success": true,
  "message": "The OU was successfully created."
}

400 BadRequest

The provided query parameters or request body is malformed or invalid.

  • *NOTE* - Depending on where it fails in the process, the OU may have been created.
{
  "success": false,
  "message": "An exception occurred.",
  "error": {
    "errorCode": -2147483648,
    "errorExtended": "<additional details if available>",
    "onProperty": "description",
    "operationType": "Set"
  }
}

Clone this wiki locally