Connecting to the directory server Before you retrieve data from, or add data to, the user directory, you must connect to the directory server. You can use different LDAP script functions for this purpose.