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.
I tried following query to try get member with in user group but seems not working (return null), any idea how to query a matrix for all members within all group
# Query member within group
select cn, member from 'LDAP://[domain]' where objectclass='group'
# Query user and group belongs to
select cn,memberof from 'LDAP://[domain]' where objectclass='user' and objectclass <> 'computer'
@Data_is_mymiddlename do you have any tips or documentation based on your experience using AD Web Services to query Active Directory?
Chris
here is the syntax in dynamic input, however, my task is to retireve all the users within the base domain
setting in input tools
Hi Data
Hope you don't mind me using your middle name
I'm looking at your post using Alteryx to query Active Directory In using an input tool to access the AD which works fine but the lastlogon date for my account is null do you have any idea why?
Thanks
Hi,
I tried to establish connection, but in point 11 I keep getting this error.
Is it possible to use this technique to read in the members of Active Directory groups?
did u add OleDB??
fill in all the details then u should be able to connect
Do u have any idea why certain field are not able to retrive e.g. pwdLastSet?
Does anyone have idea why certain field are not able to retrive e.g. pwdLastSet?
I see date fields also we couldn't retrieve..
User | Count |
---|---|
19 | |
15 | |
15 | |
9 | |
8 |