# How can i get the username and password of logged in user in kibana plugin 6.8?

**URL:** <https://discuss.elastic.co/t/how-can-i-get-the-username-and-password-of-logged-in-user-in-kibana-plugin-6-8/199369>\
**Category:** Kibana\
**Created:** [September 13, 2019, 6:35am UTC](https://discuss.elastic.co/t/how-can-i-get-the-username-and-password-of-logged-in-user-in-kibana-plugin-6-8/199369 "2019-09-13T06:35:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![devesh37](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/devesh37/32/56685_2.png) [@devesh37](https://discuss.elastic.co/u/devesh37)\
**Post date:** [September 13, 2019, 6:35am UTC](https://discuss.elastic.co/t/how-can-i-get-the-username-and-password-of-logged-in-user-in-kibana-plugin-6-8/199369/1 "2019-09-13T06:35:46Z")

</div>

how can i get the username and password of already authenticated logged in user in kibana plugin 6.8?

I have created a plugin in 6.8.0 kibana

I want to pass the username and password to the another app inside the iframe

---

<div class="post-metadata">

**Author:** ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)\
**Post date:** [September 13, 2019, 11:24am UTC](https://discuss.elastic.co/t/how-can-i-get-the-username-and-password-of-logged-in-user-in-kibana-plugin-6-8/199369/2 "2019-09-13T11:24:53Z")

</div>

This is not possible to do with Kibana, with any authentication provider. If you want users to have the same user/pass in kibana and another app, you can setup SAML, OIDC or Kerberos auth if that other app supports it and the same account will work on both.

---

<div class="post-metadata">

**Author:** ![devesh37](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/devesh37/32/56685_2.png) [@devesh37](https://discuss.elastic.co/u/devesh37)\
**Post date:** [September 15, 2019, 5:07pm UTC](https://discuss.elastic.co/t/how-can-i-get-the-username-and-password-of-logged-in-user-in-kibana-plugin-6-8/199369/3 "2019-09-15T17:07:17Z")

</div>

thanks for reply , i want to display logged yourname of kibana in my custom kibana plugin.  
how to do that.  
I have tried server.security in server folder of kibana plugin , but nothing comes up.

Please help because i want to show "welcome {username}" message in kibana plugin which i have developed.

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)\
**Post date:** [September 19, 2019, 1:36pm UTC](https://discuss.elastic.co/t/how-can-i-get-the-username-and-password-of-logged-in-user-in-kibana-plugin-6-8/199369/4 "2019-09-19T13:36:23Z")

</div>

This request can get you the username: server.plugins.security.getUser(request)  
And if you are using the new platform for building plugins: securityPluginSetupContract.getCurrentUser(request)

---

<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 17, 2019, 1:37pm UTC](https://discuss.elastic.co/t/how-can-i-get-the-username-and-password-of-logged-in-user-in-kibana-plugin-6-8/199369/5 "2019-10-17T13:37:39Z")

</div>

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