views:

239

answers:

1

Is there any way to retrieve the user ID of the currently logged in user from Active Directory services using LDAP over an ADODB connection in VBA?

I have only seen examples of how to query additional information about a user by specifying the user name and password. In those examples the user name is generally retrieved using Environ("username"), but some of the users of my application log onto the network using a VPN, and their Windows user name may not be the same as the user name used to log onto the network via the VPN.

Thanks!

+1  A: 

EDITED: Active Directory by itself doesn't know if someone is logged in. There's no way you can do something like:

ActiveDirectory.getIsThisUserLoggedIn("username");

Active Directory only acts as a mechanism for user metadata, security, and authentication.

Alex Beardsley
Thanks for your response Nalandial. I did try going the VBA route, but haven't received any answers. http://stackoverflow.com/questions/1532343/how-to-query-cisco-vpn-state-and-username-from-vba and http://stackoverflow.com/questions/1574777/how-do-i-get-the-current-logged-in-active-directory-username-from-vba
Kuyenda
This is exactly what I needed to know: "Active Directory by itself doesn't know if someone is logged in." So the answer to this question is "No."
Kuyenda