Skip to end of metadata
Go to start of metadata

LDAP (Lightweight Directory Access Protocol) is a protocol that allows you to search and update a directory. It is supported by several directory servers (e.g., Microsoft Active Directory, Netscape Directory Server). A directory usually contains information about users and network resources, but can contain any kind of data.

Using LDAP with Jitterbit

To use LDAP with Jitterbit, create a transformation and open the Formula Builder:

  • Select a node in the target tree.
  • Click the Formula button under the tree.
  • In the Formula Builder's function tree (lower left pane), scroll down to the LDAP section to find the functions you can use with LDAP:
    • Code: Select all.
    • bool LdapConnect (string host, string user, string password, int secure)
    • Host -- The host name of the directory server. If you receive the error message "Server Down," you may need to specify a fully qualified domain name (e.g., "").
      • This error message may also appear if:
      • A firewall is preventing access.
      • The directory is configured to respond to a different port from the one you are using.
      • You can specify a port in the host parameter:
    • User -- The user name (see examples below).
    • Password -- The user's password.
    • secure
    • 0 -- non-secure connection. Default port: 389
    • 1 -- secure connection. Default port: 389
    • 2 -- secure connection using LDAP over SSL. Default port: 636
    • Code: Select all
    • bool LdapAdd(string type, string value)
    • bool LdapRemove(string type, string value)
    • bool LdapReplace(string type, string value)
    • bool LdapExecute(string path)
    • string LdapSearch(string path, string filter, int iDetail, string attribute1, string attribute2, ...)
    • Path -- The distinct name used as the base of the search.
    • Filter -- The query string as defined by RFC 4515.
    • iDetail:
      • pass 0 -- Returns a simple string that is the first attribute found that matches your filter.
      • pass 1 -- Returns an XML representation of the search results. This can be set to a data element using the Set() function and then accessed in this or later scripts using Get() and an XPath query.
      • attribute1 -- An attribute that you wish to be included in the search result, i.e., the attribute you are searching for. You can specify as many attributes as you like, separated by commas. See example below.

To Search a Directory

  • Code: Select all
  • LdapConnect()
  • LdapSearch()
    • Code: Select all
    • LdapConnect("","ghvwright","1LikesPe@ches",0)
    • Set( "mySearchResults",  LdapSearch("CN=Users,DC=finland,DC=company,DC=com", "(&(objectCategory=person)(objectClass=user))", 1, "name", "whenCreated", "description", "telephoneNumber") )

To Modify a Directory

  • Code: Select all
  • LdapConnect()
  • one or more of:
  • Code: Select all
  • LdapAdd()
  • LdapRemove()
  • LdapReplace()
  • followed by:
  • Code: Select all
  • LdapExecute()
    • Code: Select all
    • LdapConnect("","ghvwright","1LikesPe@ches",0)
    • LdapAdd("description","Thinks a lot."); LdapReplace("telephoneNumber","(510) 555 1000");
    • LdapExecute("CN=wright,CN=Users,DC=finland,DC=company,DC=com");

Using Data From Source Tree in Calls

As with all other functions, you can use data from the source tree in the calls. To do so, put the cursor where you want the source data to appear and double click on a node of the source tree in the lower right pane of the Formula Builder. A path that Jitterbit understands will be inserted at the cursor location.

On This Page

Related Topics