Skip to content

Group Create

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

POST /create/group

Creates a new Active Directory group 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
type string distribution, security security The group's type.
scope string global, domainLocal, universal global The group's scope.
cn string The common name of the newly created group (without the CN= prefix)

Optional Body Parameters

Name Type Enum Values Default Value Description
path string null The OU (or container) distinguished name where the group will be created. If this is not specified, the default user location will be used.
ANY ADDITIONAL ATTRIBUTES depends Any additional attribute/values to have set.

EXAMPLE

{
  "type": "distribution",
  "scope": "global",
  "cn": "John Doe",
  "path": "OU=AllUsers,DC=contoso,DC=com",
  // additional attribute/values can be added as necessary
  "additionalProp1": "string",
  "additionalProp2": "string",
  "additionalProp3": "string"
  // etc.
}

Returns

201 Created

{
  "dn": "<DN of the newly created group>",
  "success": true,
  "message": "The group 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 group may have been created.
{
  "success": false,
  "message": "An exception occurred.",
  "error": {
    "errorCode": -2147483648,
    "errorExtended": "<additional details if available>",
    "onProperty": "mail",
    "operationType": "Set"
  }
}

Clone this wiki locally