---
type: api
title: Enroll Kibana
description: Enable a Kibana instance to configure itself for communication with a secured Elasticsearch cluster.
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/v8/operation/operation-security-enroll-kibana
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/v8/operation/operation-security-enroll-kibana
products:
  - Elasticsearch
---

# Enroll Kibana

Availability: 8.0+

## Paths

- `GET` `/_security/enroll/kibana`

- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/elasticsearch/v8/authentication#apikeyauth)
- [Basic auth](/elastic/docs-builder/docs/4371/api/doc/elasticsearch/v8/authentication#basicauth)
- [Bearer auth](/elastic/docs-builder/docs/4371/api/doc/elasticsearch/v8/authentication#bearerauth)

## Description

Enable a Kibana instance to configure itself for communication with a secured Elasticsearch cluster.

NOTE: This API is currently intended for internal use only by Kibana.
Kibana uses this API internally to configure itself for communications with an Elasticsearch cluster that already has security features enabled.

## Response

`application/json`

- `token` ({} Token)
  - `name` (string)
    The name of the bearer token for the `elastic/kibana` service account.
  - `value` (string)
    The value of the bearer token for the `elastic/kibana` service account.
Use this value to authenticate the service account with Elasticsearch.
- `http_ca` (string)
  The CA certificate used to sign the node certificates that Elasticsearch uses for TLS on the HTTP layer.
The certificate is returned as a Base64 encoded string of the ASN.1 DER encoding of the certificate.
## Code Examples

#### Console

```console
GET /_security/enroll/kibana
```

#### JavaScript

```javascript
const response = await client.security.enrollKibana();
```

#### Python

```python
resp = client.security.enroll_kibana()
```

#### curl

```curl
curl -X GET "$ELASTICSEARCH_URL/_security/enroll/kibana" \
  -H "Authorization: ApiKey $ELASTIC_API_KEY"
```

#### Java

```java
client.security().enrollKibana();
```

#### C#

```c#
var response = await client.Security.EnrollKibanaAsync();
```

#### PHP

```php
$resp = $client->security()->enrollKibana();
```

#### Ruby

```ruby
response = client.security.enroll_kibana
```

## Response Examples

#### Enroll kibana response example1

A successful response from `GET /_security/enroll/kibana`.

```json
{
  "token" : {
    "name" : "enroll-process-token-1629123923000", 
    "value": "AAEAAWVsYXN0aWM...vZmxlZXQtc2VydmVyL3Rva2VuMTo3TFdaSDZ" 
  },
  "http_ca" : "MIIJlAIBAzVoGCSqGSIb3...vsDfsA3UZBAjEPfhubpQysAICAA=", 
}
```

