---
type: api
title: Delete Active Directory configuration
description: Deletes a single Active Directory configuration.
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/cloud-enterprise/v4/operation/operation-delete-active-directory-configuration
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/cloud-enterprise/v4/operation/operation-delete-active-directory-configuration
products:
  - Elastic Cloud Enterprise
---

# Delete Active Directory configuration

## Paths

- `DELETE` `/platform/configuration/security/realms/active-directory/{realm_id}`

- [Basic auth](/elastic/docs-builder/docs/4371/api/doc/cloud-enterprise/v4/authentication#basicauth)
- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/cloud-enterprise/v4/authentication#apikey)

#### Path Parameters

- `realm_id` (string)
  The Elasticsearch Security realm identifier.

## Description

Deletes a single Active Directory configuration.

## Query String Parameters

- `version` (string)
  When specified, checks for conflicts against the version stored in the persistent store (returned in 'x-cloud-resource-version' of the GET request)

## Responses

#### `200`

The Active Directory configuration was successfully deleted

`application/json`

Type: `EmptyResponse`

#### `404`

The realm specified by {realm_id} cannot be found. (code: `security_realm.not_found`)

`application/json`

- `errors` ([] BasicFailedReplyElement)
  A list of errors that occurred in the failing request
  - `code` (string)
    A structured code representing the error type that occurred
  - `message` (string)
    A human readable message describing the error that occurred
  - `fields` ([] string)
    If the error can be tied to a specific field or fields in the user request, this lists those fields
##### Response Headers

- `x-cloud-error-codes` (enum)
  The error codes associated with the response

#### `409`

There is a version conflict. (code: `security_realm.version_conflict`)

`application/json`

- `errors` ([] BasicFailedReplyElement)
  A list of errors that occurred in the failing request
  - `code` (string)
    A structured code representing the error type that occurred
  - `message` (string)
    A human readable message describing the error that occurred
  - `fields` ([] string)
    If the error can be tied to a specific field or fields in the user request, this lists those fields
##### Response Headers

- `x-cloud-error-codes` (enum)
  The error codes associated with the response

## Code Examples

#### Console

```console
DELETE /platform/configuration/security/realms/active-directory/{realm_id}
```

#### curl

```curl
curl -X DELETE "/platform/configuration/security/realms/active-directory/{realm_id}"
```

