# Query Active Directory from Ignition

**URL:** <https://forum.inductiveautomation.com/t/query-active-directory-from-ignition/74975>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [June 13, 2023, 7:09pm UTC](https://forum.inductiveautomation.com/t/query-active-directory-from-ignition/74975 "2023-06-13T19:09:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ethan\_Caplea](https://avatars.discourse-cdn.com/v4/letter/e/9d8465/32.png) [@Ethan\_Caplea](https://forum.inductiveautomation.com/u/Ethan_Caplea)\
**Post date:** [June 13, 2023, 7:09pm UTC](https://forum.inductiveautomation.com/t/query-active-directory-from-ignition/74975/1 "2023-06-13T19:09:15Z")

</div>

Is there any way to query Active Directory from Ignition? I would like to use a unique identifier to reference users from an AD/internal user source, like an Active Directory SID, and avoid complications if users have the same name  
e.g. a user, John Smith, leaves the company and a new John Smith is hired but reference to either of them in reports, etc. must be discernable.

---

<div class="post-metadata">

**Author:** ![zacht](https://avatars.discourse-cdn.com/v4/letter/z/ea5d25/32.png) [@zacht](https://forum.inductiveautomation.com/u/zacht)\
**Post date:** [June 13, 2023, 10:41pm UTC](https://forum.inductiveautomation.com/t/query-active-directory-from-ignition/74975/2 "2023-06-13T22:41:51Z")

</div>

I connected to our AD instance as a Linked server in MS SQL Server. I have a few stored procedures or table value functions that fetch the data I need.

> **[Create linked servers - SQL Server](https://learn.microsoft.com/en-us/sql/relational-databases/linked-servers/create-linked-servers-sql-server-database-engine?view=sql-server-ver16)**
>
> Create linked servers (SQL Server Database Engine)

---

<div class="post-metadata">

**Author:** ![Ethan\_Caplea](https://avatars.discourse-cdn.com/v4/letter/e/9d8465/32.png) [@Ethan\_Caplea](https://forum.inductiveautomation.com/u/Ethan_Caplea)\
**Post date:** [June 14, 2023, 2:45pm UTC](https://forum.inductiveautomation.com/t/query-active-directory-from-ignition/74975/3 "2023-06-14T14:45:00Z")

</div>

Thank's @zacht, It seems like that would work. Unfortunately it also seems that SQL Server on Linux does not support linked servers to platforms other than SQL Server and our server is, in fact, on Linux.

[https://stackoverflow.com/questions/58883835/microsoft-sql-server-management-studio-cant-select-other-data-source-when-ad](https://stackoverflow.com/questions/58883835/microsoft-sql-server-management-studio-cant-select-other-data-source-when-ad)  
More info on this here ^
