Active Directory - pull custom attributes?

Is it possible to pull attribute values from the attribute editor in AD into Ignition? For example, I have an employeeID attribute and would like to display this in Ignition (to avoid duplication/having to save values in a database in addition to AD). I successfully pulled all the values (username, first name, last name, etc…) from the following manual page by using system.user.getUsers() but that only includes a short list of attributes. Is there a simple way to access and pull additional attributes from AD?

Thank you!

docs.inductiveautomation.com:84 … r.getUsers

1 Like

I’ve been wondering this too! I wish I could help more, but from what I’m reading it seems like the only way to do it may be through either custom modules or some advanced scripting and liberal use of the Java standard library. Hopefully someone with a bit more experience can see this and answer properly, though.

Its possible to use ldap or another library like this one (http://timgolden.me.uk/python/active_directory.html) in a script to get the data you want, but I agree a built in way would be really nice.

1 Like

Hi Ryan,
I thought it wasn’t possible to import modules that aren’t part of the Python standard library, which unfortunately the active_directory module isn’t. Is there a way to somehow import it anyway?

You certainly can! Only restriction is the python needs to be compatible with jython 2.5, so things that only work on python 2.6+ cannot be used.

Just drop the script/lib into the user-lib/pylib folder. More details here How do we import new python libraries to ignition

2 Likes

Thanks! It seems you’re right, and your solution worked just fine.