# Kibana: Failed to decrypt "apiKey" attribute: Unsupported state or unable to authenticate data

**URL:** <https://discuss.elastic.co/t/kibana-failed-to-decrypt-apikey-attribute-unsupported-state-or-unable-to-authenticate-data/251236>\
**Category:** Kibana\
**Created:** [October 7, 2020, 8:42am UTC](https://discuss.elastic.co/t/kibana-failed-to-decrypt-apikey-attribute-unsupported-state-or-unable-to-authenticate-data/251236 "2020-10-07T08:42:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Abdelhalim](https://avatars.discourse-cdn.com/v4/letter/a/838e76/32.png) [@Abdelhalim](https://discuss.elastic.co/u/Abdelhalim)\
**Post date:** [October 7, 2020, 8:42am UTC](https://discuss.elastic.co/t/kibana-failed-to-decrypt-apikey-attribute-unsupported-state-or-unable-to-authenticate-data/251236/1 "2020-10-07T08:42:20Z")

</div>

Hello everybody,

I am facing the error:

```auto
Kibana: Failed to decrypt "apiKey" attribute: Unsupported state or unable to authenticate data

```

After that I added the line below to Kibana configuration file:

```auto
xpack.encryptedSavedObjects.encryptionKey: "azertyuiopqsdfghjklmwxcvbn1234567890"

```

Could you tell me please how can resolve the problem

Thanks for your help.

---

<div class="post-metadata">

**Author:** ![Wolfram\_Haussig](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wolfram_haussig/32/70528_2.png) [@Wolfram\_Haussig](https://discuss.elastic.co/u/Wolfram_Haussig)\
**Post date:** [October 7, 2020, 8:55am UTC](https://discuss.elastic.co/t/kibana-failed-to-decrypt-apikey-attribute-unsupported-state-or-unable-to-authenticate-data/251236/2 "2020-10-07T08:55:32Z")

</div>

Hi,

What steps did you do to get this error?  
Which version are you on? For example, [here](https://github.com/elastic/kibana/issues/64870) is a bug that was fixed in 7.7.1

Best regards  
Wolfram

---

<div class="post-metadata">

**Author:** ![Abdelhalim](https://avatars.discourse-cdn.com/v4/letter/a/838e76/32.png) [@Abdelhalim](https://discuss.elastic.co/u/Abdelhalim)\
**Post date:** [October 7, 2020, 9:04am UTC](https://discuss.elastic.co/t/kibana-failed-to-decrypt-apikey-attribute-unsupported-state-or-unable-to-authenticate-data/251236/3 "2020-10-07T09:04:45Z")

</div>

thanks for your reply @Wolfram_Haussig

I got that error just when I added that line to kibana configuration  
for the versions, I am trying kibana and Elasticsearch from code source, so it's version 8.0.0

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [November 4, 2020, 9:04am UTC](https://discuss.elastic.co/t/kibana-failed-to-decrypt-apikey-attribute-unsupported-state-or-unable-to-authenticate-data/251236/4 "2020-11-04T09:04:56Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.

---

<div class="post-metadata">

**Author:** ![Ivan.fernandez](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ivan.fernandez/32/84457_2.png) [@Ivan.fernandez](https://discuss.elastic.co/u/Ivan.fernandez)\
**Post date:** [June 15, 2022, 9:49am UTC](https://discuss.elastic.co/t/kibana-failed-to-decrypt-apikey-attribute-unsupported-state-or-unable-to-authenticate-data/251236/5 "2022-06-15T09:49:58Z")

</div>

if there are executing rule errors near like the following, the cause is that some alerts are corrupted (probably because were saved with a different key by another Kibana instance) so you have to disable and enable the alerts that are shown in error at `Stack Management/Rules and Connectors`

```auto
Executing Rule default:some_alert_name:b5e2b790-d781-11ec-a057-9302a693dae8 has resulted in Error: Unable to decrypt attribute "apiKey"

```
