# Keycloak with ELK: Authentication to realm c9 failed - Failed to authenticate user with OpenID Connect

**URL:** <https://forum.keycloak.org/t/keycloak-with-elk-authentication-to-realm-c9-failed-failed-to-authenticate-user-with-openid-connect/18329>\
**Category:** Securing applications\
**Tags:** oidc\
**Created:** [November 8, 2022, 2:52pm UTC](https://forum.keycloak.org/t/keycloak-with-elk-authentication-to-realm-c9-failed-failed-to-authenticate-user-with-openid-connect/18329 "2022-11-08T14:52:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sheereen](https://avatars.discourse-cdn.com/v4/letter/s/bc79bd/32.png) [@sheereen](https://forum.keycloak.org/u/sheereen)\
**Post date:** [November 8, 2022, 2:52pm UTC](https://forum.keycloak.org/t/keycloak-with-elk-authentication-to-realm-c9-failed-failed-to-authenticate-user-with-openid-connect/18329/1 "2022-11-08T14:52:38Z")

</div>

Hi,

I am integrating Elasticsearch, Kibana with Keycloak.

When I login from Elasticsearch, I enetered details in Keycloak ui. It gives me error.

 ![image](https://global.discourse-cdn.com/free1/uploads/keycloak/original/2X/1/1dc9a5856fb6767266b5f7027de62f97654b40e5.png)

 ![image](https://global.discourse-cdn.com/free1/uploads/keycloak/original/2X/d/dd059b2bc6efc3cc9d72ad006b6f266802911f81.png)

 ![image](https://global.discourse-cdn.com/free1/uploads/keycloak/original/2X/c/c041013a71e3a51969dbc99d2afeab6484214c2d.png)

While in Keycloak it shows up in session

 ![image](https://global.discourse-cdn.com/free1/uploads/keycloak/original/2X/a/aca69ae8ea4e8776a17bb9966cec01230bc6e4a3.png)

Error in ELasticsearch:

```auto
[2022-11-08T17:49:29,667][WARN][o.e.x.s.a.RealmsAuthenticator] [node-1] Authentication to realm c9 failed - Failed to authenticate user with OpenID Connect (Caused by org.elasticsearch.ElasticsearchSecurityException: Failed to parse or validate the ID Token)

```
