I searched the APEX documentation and I didn't see anything relating to LDAP.

We have the ID for a customers Active Directory [AD] profile stored within Salesforce. We are looking to call AD and query for their username with that ID upon a triggered action.

I'm not too familiar with AD or PING so forgive me if I sound uneducated there.

  • Not really sure what LDAP is... Reading your question, are you asking if you can make some sort of WebService callout from a trigger? – dphil Apr 8 '14 at 14:03
  • Sorry for not selecting an answer - we haven't implemented anything like this, so I can't confirm if any of these are true. – zainogj Jul 3 '14 at 13:19

You are able to make a webservice call to an LDAP service in a trigger however it will have to be via an asynchronous call to the service (so through a method defined as @future) which can then make the update as needed.

If the LDAP service provides a WSDL for connecting then you can generate the needed classes in Salesforce, or use a service like this to turn a compatible LDAP service into a RESTful one.

| improve this answer | |

You cannot directly interface with an LDAP data source from apex. The only supported way of calling a remote service via apex is either HTTP(S) or SMTP (aka email; not helpful here).

As @pbattisson mentioned there are some middleware applications that allow proxying LDAP to and from HTTP(S) data. Be it a RESTful or SOAP-based stack apex should support them (although excessively complex WSDL can be an issue).

It's also worth noting that webservice callouts are not allowed directly from a trigger - you'd have to use something like an @future method in order to process the callout asynchronously.

At the end of the day it's certainly possible, but it is rather labor intensive to make this happen, and requires 3rd party software.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.