Here are my instructions for using Alteryx to query Active Directory. We use Alteryx 2019.1 and this workflow was run against a Windows Server 2008 R2 AD instance. Your mileage may vary if your configuration is different.
Note: This is my first new thread post on the community, so please let me know if I missed something or need to make changes.
I am also working on a "group membership" workflow/macro. I hope to post those instructions in the near future.
Feel free to provide feedback (even grammar!).
Thank you.
How to add an Active Directory lookup to your Alteryx workflow
Note: Please use a local domain control for best performance. To see the local Windows PC’s currently connected domain controller, open Command Prompt (CMD.exe) and type SET. The information will be under the LOGONSERVER value. Be sure to add your domain name to the end if SET is used to find the domain controller.
Note: If you close this window, you will have to restart from step 3.
For more attributes, check with your Active Directory Administrator or the Internet.
SELECT (add desired attributes separated by a comma here)
from 'LDAP://(Active Directory Server)’
where (desired attribute search) = ‘test’
Note: The search criteria is ‘test’ because the Dynamic Input tool will replace ‘test’ with the actual results from a preceding tool in the workflow.
Here is an example where name, userid, and email would be returned from a local Active Directory Server with a search based on userid:
SELECT cn, samaccountname, mail from 'LDAP://ADServer.domain.com’
WHERE samaccountname = 'test'
Here is a second example where name, title, supervisor name, supervisor userID, job hierarchy info, employee type, and office city would be returned from a local Active Directory Server with a search based on email address:
SELECT cn, title, ReportsToName, SupvID, division, employeeType, location from 'LDAP://ADServer.domain.com’ WHERE mail = 'test'
Note: In this example, the mail attribute is being used for the search and so the email_address field from a previous tool in the workflow will be used to populate the search.
Additional information:
To modify your SQL query after completing step 19, follow the steps below:
I. Select the Dynamic Input tool then click Edit in the Input Data Source Template section
II. Click the … under option 4 in the Alteryx Designer x64
III. An error message like the one below will appear. Do not worry as this is normal and due to the way that Alteryx works. Click OK to close the Parsing Error
IV. Follow steps 10 through 16 above to enter and test the updated SQL query.
V. Continue through steps 17 through 19 if the attribute used in the WHERE clause was changed.
Hello!
I followed all of the instructions and with minor adjustments, was able to connect.
However, when using the dynamic input tool and having it cycle through each filter entry takes an extremely long time. When I used the same query in a normal input tool with the filter set to use the wildcard '*', it only pulls one record before errorring out. The same query used in Softerra (an LDAP browser) will pull the entire list (not just one record) and much faster than the cycle method.
Has anyone worked through these issues? Or is there a better method to using Alteryx to pull AD information now?
The process is very slow when we have multiple domains as we use append tool.
UNION in sql is also not working.
Is there a faster way when we have thousands of records
Hi, anyone solve the problem with the date fields? accountexpires, lastlogon are null because of the type of field.
User | Count |
---|---|
19 | |
15 | |
15 | |
9 | |
8 |