J. Davidson
J. Davidson

Reputation: 3317

Saving LDAP search result in csv

I am reading active director user information than i want to save to csv file.

DirectoryEntry de=new DirectoryEntry("LDAP://xxxx.com, xxxx, xxxx,     AutentniciationTypes.Secure");
DirectorySearcher ds=new DirectorySearcher(de);
ds.Filter="(&(objectClass=user)(I="+ "xxxx"));
SearchhResultCollection results=ds.FindAll();

Next i would like to save the "results" to csv file. Please let me known to do it. Thanks

Upvotes: 0

Views: 1546

Answers (1)

G K
G K

Reputation: 2501

It seems that you are looking for the same as in this question https://stackoverflow.com/questions/18594416/searchresultcollection-to-csv

Iterate through the SearchResultCollection and write to a text-file as mentioned in above link.

Upvotes: 1

Related Questions