# I'm auto-logged-in as my anonymous user and cannot log in as administrator anymore

**URL:** <https://discuss.elastic.co/t/im-auto-logged-in-as-my-anonymous-user-and-cannot-log-in-as-administrator-anymore/281810>\
**Category:** Kibana\
**Tags:** elastic-stack-security\
**Created:** [August 18, 2021, 10:36am UTC](https://discuss.elastic.co/t/im-auto-logged-in-as-my-anonymous-user-and-cannot-log-in-as-administrator-anymore/281810 "2021-08-18T10:36:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nsouth](https://avatars.discourse-cdn.com/v4/letter/n/ecccb3/32.png) [@nsouth](https://discuss.elastic.co/u/nsouth)\
**Post date:** [August 18, 2021, 10:36am UTC](https://discuss.elastic.co/t/im-auto-logged-in-as-my-anonymous-user-and-cannot-log-in-as-administrator-anymore/281810/1 "2021-08-18T10:36:24Z")

</div>

I added the following to my `kibana.yml` for the sake of embedding visualizations, but now when I log in to the Kibana web portal, I'm auto-logged-in as `dashboard_viewer` and cannot log out or choose to log in as the `elastic` admin account. How can I fix this? Thanks!

```auto
xpack.security.authc.providers:
  anonymous.anonymous1:
      order: 0
      credentials:
        username: "dashboard_viewer"
        password: "[password]"

xpack.security.sameSiteCookies: "None"

```

![image](https://us1.discourse-cdn.com/elastic/original/3X/a/1/a1b115beeb76a0f897cb148a9eeead8bb04a273c.png)

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [August 18, 2021, 2:05pm UTC](https://discuss.elastic.co/t/im-auto-logged-in-as-my-anonymous-user-and-cannot-log-in-as-administrator-anymore/281810/2 "2021-08-18T14:05:18Z")

</div>

See example here

> [@Anonymous Kibana Users](https://discuss.elastic.co/t/anonymous-kibana-users/270071/9):
>
> @caitlyn.carlisle Ok we have it slight_smile If I understand correctly, What you want to accomplish is enable the ability for a user to anonymous login to view Kibana dashboards etc. That is supported in Elastic Cloud, what is not supported is underlying anonymous access to elasticsearch. That is where the confusion lay. So this is how you do it. Reference [Here](https://www.elastic.co/guide/en/kibana/7.12/kibana-authentication.html#anonymous-authentication).. and there is even a little video on it [here](https://www.elastic.co/blog/whats-new-kibana-7-11-0-alerting-generally-available) . Note the docs link to 7.11 so make sure you use the latest. First create the use…

You need to add the basic auth in as well

```auto
xpack.security.authc.providers:
  basic.basic1: <!-- This is the normal login
    order: 0  
  anonymous.anonymous1: <!-- This is the anonymous login
    order: 1
    credentials:
      username: "test"
      password: "askldjfhaslkdjf1654

```

---

<div class="post-metadata">

**Author:** ![nsouth](https://avatars.discourse-cdn.com/v4/letter/n/ecccb3/32.png) [@nsouth](https://discuss.elastic.co/u/nsouth)\
**Post date:** [August 18, 2021, 2:48pm UTC](https://discuss.elastic.co/t/im-auto-logged-in-as-my-anonymous-user-and-cannot-log-in-as-administrator-anymore/281810/3 "2021-08-18T14:48:33Z")

</div>

That did it. I figured it was something simple like that. Thanks!

---

<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:** [September 15, 2021, 2:48pm UTC](https://discuss.elastic.co/t/im-auto-logged-in-as-my-anonymous-user-and-cannot-log-in-as-administrator-anymore/281810/4 "2021-09-15T14:48:42Z")

</div>

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