# LOGIN API For Xpack

**URL:** <https://discuss.elastic.co/t/login-api-for-xpack/146476>\
**Category:** Elasticsearch\
**Created:** [August 29, 2018, 7:26am UTC](https://discuss.elastic.co/t/login-api-for-xpack/146476 "2018-08-29T07:26:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ritwikkaul](https://avatars.discourse-cdn.com/v4/letter/r/839c29/32.png) [@ritwikkaul](https://discuss.elastic.co/u/ritwikkaul)\
**Post date:** [August 29, 2018, 7:26am UTC](https://discuss.elastic.co/t/login-api-for-xpack/146476/1 "2018-08-29T07:26:08Z")

</div>

Hi

Earlier there used to be an API - /api/security/v1/login.

Is there any similar API in the lastest kibana/xpack which has the same functionality as the earlier API.  
I want to authenticate people though an ajax call.

Thanks

---

<div class="post-metadata">

**Author:** ![cjcenizal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cjcenizal/32/11216_2.png) [@cjcenizal](https://discuss.elastic.co/u/cjcenizal)\
**Post date:** [September 7, 2018, 3:19pm UTC](https://discuss.elastic.co/t/login-api-for-xpack/146476/2 "2018-09-07T15:19:45Z")

</div>

Hi there,

That login endpoint still exists, but Kibana's APIs don't support cross-origin requests, so to send a POST request to any endpoints would require hosting Kibana on a subpath of the domain from which the request originates. I haven't seen this done before, so if you're looking for a simpler option I'd suggest looking into setting up SAML ([https://www.elastic.co/blog/how-to-enable-saml-authentication-in-kibana-and-elasticsearch](https://www.elastic.co/blog/how-to-enable-saml-authentication-in-kibana-and-elasticsearch)), which will allow you to authenticate all of your users using a third-party authentication provider.

Thanks,  
CJ

---

<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:** [October 5, 2018, 3:19pm UTC](https://discuss.elastic.co/t/login-api-for-xpack/146476/3 "2018-10-05T15:19:51Z")

</div>

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