Monday, 15 December 2014

How to get a list of userID from LDAP distribution list

IN a project, you may require to create user groups based on existing distribution groups in AD (active directory). You may collaborate with AD team to provide you the information. If you have access to LDAP, you may try the follow

Initial Setup:

  1. Download Softerra LDAP Administrator (free) and install.
  2. Click New to add a new profile
  3. For the hostname please ask AD team for the address.
  4. Click Next
  5. Choose currently logged on user
  6. Finish



How to search and export the details


  1. You should see the LDAP server on the left, right click and select Directory Search

  2. Enter the DL under Filter. Example of the format is cn=dl.sap_basis and click search
  3. Highlight the search result and paste it onto a notepad. You will below text
    ldap://ssvldcp01.dell.com:389/CN=DL.SAP_Basis,OU=Groups/DLs,DC=dell,DC=com
  4. Now replace <FROM_THE_SEARCH_RESULT> to the above search result
    (&(objectCategory=user)(memberOf=<FROM_THE_SEARCH_RESULT>))
  5. Final text should look like
    (&(objectCategory=user)(memberOf=CN=DL.SAP_Basis,OU=Groups/DLs,DC=dell,DC=com))
  6. Highlight and copy the text from step 5.
  7. Back to Softerra,
  8. Paste it under Quick Search (top left) and press enter.
  9. Then paste the same text again to the filter filter. Press enter.

  10. You will have a list of UserID belonging to the DL.
  11. Now export the data. File > Export Data > CSV > Finish
  12. Open the *.CSV file with Microsoft Excel and you will get the UserID under column BD called "sAMAccountName"