# system.user.getUser is slow with many Active directory users

**URL:** <https://forum.inductiveautomation.com/t/system-user-getuser-is-slow-with-many-active-directory-users/78714>\
**Category:** Ignition\
**Created:** [September 4, 2023, 8:26am UTC](https://forum.inductiveautomation.com/t/system-user-getuser-is-slow-with-many-active-directory-users/78714 "2023-09-04T08:26:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![BVTV](https://avatars.discourse-cdn.com/v4/letter/b/e5b9ba/32.png) [@BVTV](https://forum.inductiveautomation.com/u/BVTV)\
**Post date:** [September 4, 2023, 8:26am UTC](https://forum.inductiveautomation.com/t/system-user-getuser-is-slow-with-many-active-directory-users/78714/1 "2023-09-04T08:26:10Z")

</div>

I want to check if a username exists in my User source.  
I am using the "AD/Database Hybrid" user source.  
I first tried to loop through all the users available from "system.user.getUsers", but this was way too slow because we have more than 30000 users in our domain.  
I then expected "system.user.getUser" to be faster, but it felt equally slow.  
Is there anything else I can try?  
Is Ignition reading all the AD users every time I call the getUser command?  
Using the LDAP protocol, it should be able to fetch only the users that matches some filter criteria.

Ideally, I would like a fast responding function that returns all usernames that matches a string with wildcards.

---

<div class="post-metadata">

**Author:** ![KathyApplebaum](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kathyapplebaum/32/7261_2.png) [@KathyApplebaum](https://forum.inductiveautomation.com/u/KathyApplebaum)\
**Post date:** [September 5, 2023, 3:25pm UTC](https://forum.inductiveautomation.com/t/system-user-getuser-is-slow-with-many-active-directory-users/78714/2 "2023-09-05T15:25:04Z")

</div>

Under the hood `getUser` just loops through the users returned by `getUsers`, so I'm not surprised they are equally slow. Unfortunately I don't know enough about LDAP to make it better, hopefully someone will chime in on that.

---

<div class="post-metadata">

**Author:** ![BVTV](https://avatars.discourse-cdn.com/v4/letter/b/e5b9ba/32.png) [@BVTV](https://forum.inductiveautomation.com/u/BVTV)\
**Post date:** [September 6, 2023, 6:24am UTC](https://forum.inductiveautomation.com/t/system-user-getuser-is-slow-with-many-active-directory-users/78714/3 "2023-09-06T06:24:03Z")

</div>

Thank you, very interesting. That means I can not use `getUser` as it is right now.

---

<div class="post-metadata">

**Author:** ![KathyApplebaum](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kathyapplebaum/32/7261_2.png) [@KathyApplebaum](https://forum.inductiveautomation.com/u/KathyApplebaum)\
**Post date:** [September 6, 2023, 2:28pm UTC](https://forum.inductiveautomation.com/t/system-user-getuser-is-slow-with-many-active-directory-users/78714/4 "2023-09-06T14:28:53Z")

</div>

I've created a ticket to see if we can improve this. If you want to get updates on it, contact support and tell them it's IGN-8365.
