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:
How to search and export the details
Initial Setup:
- Download Softerra LDAP Administrator (free) and install.
- Click New to add a new profile
- For the hostname please ask AD team for the address.
- Click Next
- Choose currently logged on user
- Finish
How to search and export the details
- You should see the LDAP server on the left, right click and select Directory Search
- Enter the DL under Filter. Example of the format is cn=dl.sap_basis and click search
- 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 - Now replace <FROM_THE_SEARCH_RESULT> to the above search result
(&(objectCategory=user)(memberOf=<FROM_THE_SEARCH_RESULT>)) - Final text should look like
(&(objectCategory=user)(memberOf=CN=DL.SAP_Basis,OU=Groups/DLs,DC=dell,DC=com)) - Highlight and copy the text from step 5.
- Back to Softerra,
- Paste it under Quick Search (top left) and press enter.
- Then paste the same text again to the filter filter. Press enter.
- You will have a list of UserID belonging to the DL.
- Now export the data. File > Export Data > CSV > Finish
- Open the *.CSV file with Microsoft Excel and you will get the UserID under column BD called "sAMAccountName"