10-29-2014 02:39 PM - edited 03-14-2019 02:03 PM
Does anyone know how to query Active Directory from a UCCX script? Looking to pull the caller's email field from the ANI.
10-30-2014 05:56 AM
Hi
You can do this, but it's not so simple. Two options:
1) Create a custom java class to read LDAP and return the info you require
2) Implement a middleware web server that you can call from UCCX, that would take ANI as a parameter and return the email address.
I've done 1) before, or something very similar...
Aaron
10-30-2014 10:07 AM
Just watch out for what the failure mode is, if the query doesn't return. I've had something similar where the AD server didn't respond (due to patching) and the calls were then having large wait times before being placed into the CSQ.
AD resilience in general is a pain...
11-01-2014 02:01 PM
Hi. Take a look at this.
G.
11-04-2014 09:34 AM
Hey Aaron and Gergely,
Thanks to you both for your replies. Sorry I didn't update sooner. I'll give these suggestions a shot and post back.
09-04-2015 12:41 PM
Hello Joe,
Do you managed integration script uccx with AD?
If yes, send me please.
09-08-2015 02:41 PM
No, I didn't get it to work and never revisited it. Sorry.
03-07-2017 10:06 AM
This discussion is pretty old now, but I'm forced to revisit it now as I have to get this working. I need to query AD to pull the email address of internal callers based on ANI. I've read Gergely's post and tried using some of the things in it to accomplish what I need but am not having any luck because I don't know what the heck I'm doing and this forum is the only resource I have available to ask for assistance. So, if anyone has any wisdom to share on how to query AD from script variables, and return query results back into a script variable, I'd very much appreciate it. Please note that I'm not a Java developer.
03-07-2017 10:50 AM
If you have Premium licensing it seems like you could do a SQL call to the domain controller and try and pull the email that way.
For compatibility sake may have to dump the AD data into a compatible SQL database first though and then query that DB.
That seems like the most down and dirty way to me without having to do anything with Java. The Java method seems like it would be the most fun though.
03-07-2017 01:34 PM
Thanks, Joshua. I don't mind doing Java, I just need some guidance. I think everything I'd need to do it exists in Gergely's example, but I don't know what chunks of it to pull out and use in my script, nor how to pass from a variable to the java code and then the results back to a variable.
03-08-2017 12:24 PM
Joe, would you mind posting the account details of a typical user in your AD structure? All I need to know is what fields contain the phone number and the email address. We'll have to use these fields in our LDAP query. I'll help you with the Java part.
G.
03-09-2017 11:26 AM
You have no idea how much I would appreciate your help! I really did try and tailor what you had done in your document to my situation, but after trying for a day and a half I came to the realization that I simply don't have enough knowledge to customize or get it to work for what I need. So, the AD attributes where users ext and email address are populated are named telephoneNumber and mail.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide