# Winlogbeat unable to connect to elasticsearch

**URL:** <https://discuss.elastic.co/t/winlogbeat-unable-to-connect-to-elasticsearch/360757>\
**Category:** Beats\
**Tags:** winlogbeat\
**Created:** [June 4, 2024, 6:21am UTC](https://discuss.elastic.co/t/winlogbeat-unable-to-connect-to-elasticsearch/360757 "2024-06-04T06:21:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sudharsanam132](https://avatars.discourse-cdn.com/v4/letter/s/97f17d/32.png) [@sudharsanam132](https://discuss.elastic.co/u/sudharsanam132)\
**Post date:** [June 4, 2024, 6:21am UTC](https://discuss.elastic.co/t/winlogbeat-unable-to-connect-to-elasticsearch/360757/1 "2024-06-04T06:21:06Z")

</div>

` fail to import the dashboards in Kibana: Error importing directory C:\Program Files\winlogbeat-8.9.1-windows-x86_64\kibana: failed to import Kibana index pattern: 1 error: error loading index pattern: returned 403 to import file: Unable to bulk_create index-pattern. Response: {"statusCode":403,"error":"Forbidden","message":"Unable to bulk_create index-pattern"}`

i got struct in this error winlogbeat gives this error i tried using api key

---

<div class="post-metadata">

**Author:** ![yago82](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yago82/32/97755_2.png) [@yago82](https://discuss.elastic.co/u/yago82)\
**Post date:** [June 6, 2024, 9:59am UTC](https://discuss.elastic.co/t/winlogbeat-unable-to-connect-to-elasticsearch/360757/2 "2024-06-06T09:59:12Z")

</div>

Hi,

Ensure that the API key you're using has the necessary permissions to create index patterns. This typically requires the `kibana_user` role or a custom role with equivalent permissions.

Regards
