# Getting the user info if the user is from the failover source

**URL:** <https://forum.inductiveautomation.com/t/getting-the-user-info-if-the-user-is-from-the-failover-source/72747>\
**Category:** Ignition\
**Created:** [April 21, 2023, 6:35am UTC](https://forum.inductiveautomation.com/t/getting-the-user-info-if-the-user-is-from-the-failover-source/72747 "2023-04-21T06:35:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![chaoliang](https://avatars.discourse-cdn.com/v4/letter/c/ba8739/32.png) [@chaoliang](https://forum.inductiveautomation.com/u/chaoliang)\
**Post date:** [April 21, 2023, 6:35am UTC](https://forum.inductiveautomation.com/t/getting-the-user-info-if-the-user-is-from-the-failover-source/72747/1 "2023-04-21T06:35:11Z")

</div>

Hi,

I have two user sources configured.

1. user1, failover user source is configured to use "user2"
2. user2

project 1 is using user1 as user source.

When I login the project 1 using user from user2, it can login and display correctly.

But is there any system tag that states the name of the current user "user source"?  
I can find the user name and its role under the system/user folder, but not the user source.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [April 21, 2023, 2:39pm UTC](https://forum.inductiveautomation.com/t/getting-the-user-info-if-the-user-is-from-the-failover-source/72747/2 "2023-04-21T14:39:46Z")

</div>

No, this isn't directly exposed. You could query `system.user.getUser` with your two possible user sources and see which one returns a user object for the known username?

---

<div class="post-metadata">

**Author:** ![Felipe\_CRM](https://avatars.discourse-cdn.com/v4/letter/f/dfb087/32.png) [@Felipe\_CRM](https://forum.inductiveautomation.com/u/Felipe_CRM)\
**Post date:** [April 21, 2023, 3:09pm UTC](https://forum.inductiveautomation.com/t/getting-the-user-info-if-the-user-is-from-the-failover-source/72747/3 "2023-04-21T15:09:12Z")

</div>

SoSounds

> [@paul-griffith](#):
>
> this isn't directly exposed

Sounds like a good candidate for a [suggested feature](https://inductiveautomation.canny.io/ignition-features-and-ideas) then. @chaoliang you can submit that here so hopefully they include it one day, in the meantime you can try PGriffith's workaround.

---

<div class="post-metadata">

**Author:** ![EricDykema](https://avatars.discourse-cdn.com/v4/letter/e/f6c823/32.png) [@EricDykema](https://forum.inductiveautomation.com/u/EricDykema)\
**Post date:** [August 5, 2026, 2:00am UTC](https://forum.inductiveautomation.com/t/getting-the-user-info-if-the-user-is-from-the-failover-source/72747/4 "2026-08-05T02:00:48Z")

</div>

Old thread, but getPath() in the user object may be what you're looking for. It returns a qualified path with the userSource. For example, a user "admin" in the default user source returns the following:

> usr-prov:default:/usr:admin

I've also noticed that specifically with LDAP user sources, if the user source is configured with a soft failover to a secondary user source, system.user.getUsers() will display the results of the failover user source if the primary user source is not available.

We see this a lot when a remote site connection to LDAP is unavailable, so using getPath() helps us determine if the returned results match the userSource we were originally requesting.

[User object scripting reference](https://www.docs.inductiveautomation.com/docs/8.1/appendix/reference-pages/scripting-object-reference#users)
