# Perform SwitchUser By Programmatically Settings the UserSource

**URL:** <https://forum.inductiveautomation.com/t/perform-switchuser-by-programmatically-settings-the-usersource/78699>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [September 4, 2023, 12:10am UTC](https://forum.inductiveautomation.com/t/perform-switchuser-by-programmatically-settings-the-usersource/78699 "2023-09-04T00:10:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![yiotis](https://avatars.discourse-cdn.com/v4/letter/y/e99b99/32.png) [@yiotis](https://forum.inductiveautomation.com/u/yiotis)\
**Post date:** [September 4, 2023, 12:10am UTC](https://forum.inductiveautomation.com/t/perform-switchuser-by-programmatically-settings-the-usersource/78699/1 "2023-09-04T00:10:47Z")

</div>

Hello. Is there a way to perform a "system.security.switchUser" against a specific "user source" ? I have 2 users sources labeled "UserSource1" and "UserSource2" In some situations I want the operator to login by supplying their user/pass, and when I perform the "system.security.switchUser" I want to perform it against "UserSource2" I do not want to setup "soft" failover. I want to programmatically dictate the "UserSource". Thanks. Yiotis.

---

<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:** [September 4, 2023, 1:14am UTC](https://forum.inductiveautomation.com/t/perform-switchuser-by-programmatically-settings-the-usersource/78699/2 "2023-09-04T01:14:24Z")

</div>

You cannot. You will need two separate projects.

---

<div class="post-metadata">

**Author:** ![yiotis](https://avatars.discourse-cdn.com/v4/letter/y/e99b99/32.png) [@yiotis](https://forum.inductiveautomation.com/u/yiotis)\
**Post date:** [September 4, 2023, 1:22am UTC](https://forum.inductiveautomation.com/t/perform-switchuser-by-programmatically-settings-the-usersource/78699/3 "2023-09-04T01:22:58Z")

</div>

Thank you Sir.
