# Enable auto login on kibana graph

**URL:** <https://discuss.elastic.co/t/enable-auto-login-on-kibana-graph/259986>\
**Category:** Kibana\
**Tags:** elastic-stack-security\
**Created:** [January 1, 2021, 8:45am UTC](https://discuss.elastic.co/t/enable-auto-login-on-kibana-graph/259986 "2021-01-01T08:45:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ritika\_Joshi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ritika_joshi/32/81629_2.png) [@Ritika\_Joshi](https://discuss.elastic.co/u/Ritika_Joshi)\
**Post date:** [January 1, 2021, 8:45am UTC](https://discuss.elastic.co/t/enable-auto-login-on-kibana-graph/259986/1 "2021-01-01T08:45:15Z")

</div>

Hello,  
I am trying to skip login page of kibana graph which are embedded in my web console through iframe.

I Am trying to login through XMLHttpRequest but getting following error  
Access to XMLHttpRequest at '\*\*\*\*\*\*\*' from origin '[http://localhost:3013](http://localhost:3013)' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

And also adding below line in http\_tools.js  
`cors: { additionalHeaders: ['kbn-version','cookie'], origin: ['*'] }`  
And also added following lines in kibana.yml to enable cors login

```auto
server.cors: true
server.cors.origin: ['*']
server.cors.allow-credentials: 'true'

```

After doing above changes still getting the same error, Would appreciate any help to overcome this error .

Let me know if any other details is needed

Thanks

---

<div class="post-metadata">

**Author:** ![rashmi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rashmi/32/16391_2.png) [@rashmi](https://discuss.elastic.co/u/rashmi)\
**Post date:** [January 3, 2021, 11:29pm UTC](https://discuss.elastic.co/t/enable-auto-login-on-kibana-graph/259986/2 "2021-01-03T23:29:23Z")

</div>

> [@Ritika\_Joshi](#):
>
> has been blocked by CORS policy: Response to preflight request doesn't pass access control check:

Have you tried enabling CORS setting in Kibana? In order to make requests across domains inside a browser, you'll need to enable CORS on the Kibana server. Unfortunately, this is not a documented configuration option, but it is supported.

Add `server.cors: true` to your kibana.yml in the Cloud dashboard. This should add the `Access-Control-Allow-Origin: *` header to all responses from Kibana. Note that this enables _any_ webpage to access your Kibana API, though of course they'll still need valid credentials if you're using Security.

Hope his helps,  
Thanks  
Rashmi

---

<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:** [January 31, 2021, 11:29pm UTC](https://discuss.elastic.co/t/enable-auto-login-on-kibana-graph/259986/3 "2021-01-31T23:29:45Z")

</div>

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