Skip to content

LDAP Search Active Directory in Transformer Step #6256

Closed Answered by rjkroll
reneschoepf asked this question in Q&A
Discussion options

You must be logged in to vote

As far as I know, MIRTH cannot query AD directly, but you may be able to do it via a transformer step with Java. Maybe something like this:

/ Import necessary Java classes
importPackage(javax.naming);
importPackage(javax.naming.directory);

// Set up the environment for creating the initial context
var env = new java.util.Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
env.put(Context.PROVIDER_URL, "ldap://your.ad.server:389");
env.put(Context.SECURITY_AUTHENTICATION, "simple");
env.put(Context.SECURITY_PRINCIPAL, "your_bind_dn");
env.put(Context.SECURITY_CREDENTIALS, "your_password");

try {
    // Create the initial context
    var ctx = new In…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@pacmano1
Comment options

Answer selected by reneschoepf
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants