# Unable to log into embedded Kibana anonymously

**URL:** <https://discuss.elastic.co/t/unable-to-log-into-embedded-kibana-anonymously/291797>\
**Category:** Kibana\
**Tags:** elastic-stack-security\
**Created:** [December 14, 2021, 12:31pm UTC](https://discuss.elastic.co/t/unable-to-log-into-embedded-kibana-anonymously/291797 "2021-12-14T12:31:14Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Arrick](https://avatars.discourse-cdn.com/v4/letter/a/ba9def/32.png) [@Arrick](https://discuss.elastic.co/u/Arrick)\
**Post date:** [January 11, 2022, 9:31am UTC](https://discuss.elastic.co/t/unable-to-log-into-embedded-kibana-anonymously/291797/5 "2022-01-11T09:31:28Z")

</div>

Hello @yanwencheng , I went with a different approach. Instead of giving an API key the privilege role (in my case the role is called `anonymous-role`), I gave the `anonymous-role` to a newly created user and used the following code instead;

```auto
xpack.security.authc.providers:
    basic.basic1:
        order: 0
    anonymous.anonymous1:
        order: 1
        credentials:
            username: "[insert username here]"
            password: "[insert password here]"

```

You can refer to my post here regarding it [here](https://discuss.elastic.co/t/embedded-kibana-dashboard-login-page-keeps-reloading-back-to-the-same-page/293028)

---

_[View the full topic](https://discuss.elastic.co/t/unable-to-log-into-embedded-kibana-anonymously/291797)._
