Landmine
Landmine

Reputation: 1789

Access current user information via LDAP

How can I access the current user information via LDAP and VB.Net 2.0*?

I found a vbscript that works, but I'd rather have it done in .net

Dim objSysInfo = CreateObject("ADSystemInfo")
Dim strUser = objSysInfo.UserName 'returns current user account
Dim objUser = GetObject("LDAP://" & strUser) 'queries active directory for user account

Any ideas out there? Because objUser.l makes less sense to me.

*I'm using the framework 2.0 because it is for more likely in my XP/Vista/7 World to have 2.0 installed than 3.5 or 4.0

Upvotes: 0

Views: 7733

Answers (1)

Related Questions