Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cross-Compare from Excel to Active Directory

Status
Not open for further replies.
Dec 27, 2001
114
US
We're currently using SharePoint to administer surveys to our user base; however, we're given only the user's NTLM display name and nothing else.

I'd like to take the CSV export, read each line into an array, and do a lookup against AD for the department and username of that user, then export it back to another CSV.

Ideas?

---
David R. Longnecker
Web Developer
CCNA, MCSA, Network+, A+
Management Information Services
Wichita Public Schools, USD 259
 
GetObject("WinNT://domainname/" & strUserName & ",user")
but this might not give you all the fields/properties you want.

you cant use the ADSinfo as this is for the current user session...looks like you are stuck with an LDAP ADOB or SQL query to AD something like

"Select department, fullname FROM 'LDAP://adservername' WHERE objectClass = 'person' AND sAMAccountName='usernamea'"
If oRS.RecordCount = 1 Then 'loop throuugh users
For i = 0 To oRS.Fields.Count - 1
 
I can replace the WinNT moniker that you specified with LDAP, correct? Past that, I'll give the database a run... hmm, or just open the GAL in Access.. hmm.. *mind starts slowly turning*

I'll post my results back here for all.

Regards,
David

---
David R. Longnecker
Web Developer
CCNA, MCSA, Network+, A+
Management Information Services
Wichita Public Schools, USD 259
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top