# Login Failed Switching to Administrator Role

**URL:** <https://forum.inductiveautomation.com/t/login-failed-switching-to-administrator-role/58944>\
**Category:** Ignition\
**Tags:** vision, ignition81\
**Created:** [April 27, 2022, 5:11pm UTC](https://forum.inductiveautomation.com/t/login-failed-switching-to-administrator-role/58944 "2022-04-27T17:11:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![amarks](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/amarks/32/45610_2.png) [@amarks](https://forum.inductiveautomation.com/u/amarks)\
**Post date:** [April 27, 2022, 5:11pm UTC](https://forum.inductiveautomation.com/t/login-failed-switching-to-administrator-role/58944/1 "2022-04-27T17:11:20Z")

</div>

For some reason, when I try to switch users (via scripting) using my admin/password administrator credentials it does not work.

I have a classic security roles/users setup. 3 users: default, Operator, and admin. default is auto-signed in. I have a button that then prompts the user for username and password. This works flawlessly when I type in the Operator user’s credentials, but I’ve never gotten in as admin. I have verified that I have the username and password correct. These are the same credentials that I use to access the designer.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [April 27, 2022, 6:18pm UTC](https://forum.inductiveautomation.com/t/login-failed-switching-to-administrator-role/58944/2 "2022-04-27T18:18:48Z")

</div>

Do you have a required role in project properties? If so, does the admin user have that role? (Just having the Administrator role doesn’t magically grant any others.)

---

<div class="post-metadata">

**Author:** ![amarks](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/amarks/32/45610_2.png) [@amarks](https://forum.inductiveautomation.com/u/amarks)\
**Post date:** [April 27, 2022, 7:07pm UTC](https://forum.inductiveautomation.com/t/login-failed-switching-to-administrator-role/58944/3 "2022-04-27T19:07:36Z")

</div>

Administrator has all of the roles. “Required roles” is a list of all three roles.

---

<div class="post-metadata">

**Author:** ![amarks](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/amarks/32/45610_2.png) [@amarks](https://forum.inductiveautomation.com/u/amarks)\
**Post date:** [April 29, 2022, 2:00pm UTC](https://forum.inductiveautomation.com/t/login-failed-switching-to-administrator-role/58944/4 "2022-04-29T14:00:58Z")

</div>

This is my full error message

```auto
GatewayException: Login failed.
	caused by GatewayFunctionException: Login failed.

Ignition v8.1.16 (b2022040511)
Java: Azul Systems, Inc. 11.0.14.1

```

---

<div class="post-metadata">

**Author:** ![amarks](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/amarks/32/45610_2.png) [@amarks](https://forum.inductiveautomation.com/u/amarks)\
**Post date:** [April 29, 2022, 2:42pm UTC](https://forum.inductiveautomation.com/t/login-failed-switching-to-administrator-role/58944/5 "2022-04-29T14:42:56Z")

</div>

I found the issue. My bindings to the text field and password field were reversed, and my other user has identical user/password. Hence, why it worked for that user and not for admin.
