How to capture value from ldap node?

Certified Associate Developer

Hello All,

 

Is there a way to capture any specific ldap field value into process variable? I want to capture supervisor username fields value into one of the process variable but while doing so instead of getting variable value i'm getting "extesnsionAttribute4" which is the field from AD used to provide supervisor name. Any suggestion here would be appreciated

  Discussion posts and replies are publicly visible

  • I believe you are using ldapsearch() to get the LDAP information. If that's the case, 

    1. Check the LDAP attribute values through any other LDAP browser tools and make sure that the data is correct in LDAP
    2. Can you please share the masked code so that we can understand what is being queried and how?

    Thanks,

    Raghu

  • 0
    Certified Associate Developer
    in reply to Raghuvaran Nagarajan
    Hey Raghu,
    Thanks for reaply, I'm actually using "LDAP user profile synchronization with username" smart service in appian. Where it takes different fieldnames from Active directory and creates the user profile in appian based on that information. Below are the some of the field names from AD

    for Username "sAMAccountName"
    for User Supervisor UserName "extensionAttribute4"
    and so on. So while this process model executes, It will take the information from this fields and create the user profile in appian and all I want is to capture the values from "extensionAttribute4" into process variable. I hope this clarifies my scenario?
  • 0
    Certified Associate Developer
    in reply to Raghuvaran Nagarajan
    I'm now using ldapsearch() function and using the below parameters to get the result but unfortunately its showing the result success without any datasubset being returned

    ldapsearch(
    config:{
    scsExternalSystemKey:"ldap.tools",
    url:"ldap://.......:389/",
    baseDn:"OU={},DC={},DC={}",
    timeout:2000
    },
    searchFilter:"(sn=sm)",
    /*searchFilter:"(objectClass=person)",*/
    attributes:{},
    pagingInfo:a!pagingInfo(1,5)
    ),
  •  ,

    I have faced the same issue a couple of times. Even you have a paging, if the query is being executed on a wider scope of LDAP objects it will time out and you will get a success response with no data, So give the below steps a try and share the response.

    1. Increase the timeout value to something huge like 1,00,000 (This is just for testing. we have to revert this back once the issue is solved)
    2. Reduce the scope of the query by narrowing the baseDN. For instance add an another OU in the string. Eg. "OU=businessUnit1,OU=domainUsers,DC=company,DC=COM"
    3. Increase the search filter by selecting only user objects alone. Refer the attached code.
    4. Select only the attributes that you need. do not do a select *

    ldapsearch(
      config: {
        scsExternalSystemKey: "ldap.tools",
        url: "ldap://.......:389/",
        baseDn: "OU=businessUnit1,OU=domainUsers,DC=company,DC=COM",
        timeout: 100000
      },
      searchFilter: "(&(objectCategory=person)(objectClass=user)(sn=*sm*))",
      attributes: {
        "sn",
        "sAMAccountName"
      },
      pagingInfo: a!pagingInfo(
        1,
        5
      )
    )

    Thanks,

    Raghu

  • 0
    Certified Associate Developer
    in reply to Raghuvaran Nagarajan
    Hey Raghu,

    I tried all of your mentioned suggestions but still getting no data. However, When I tried via Jxplorer it worked well(Got the idea from other thread). Is there a possibility that I'm missing something here?