Possible Duplicate:
How do I get the current logged in Active Directory username from VBA?可能重复:如何从VBA获取当前登录的Active Directory用户名?
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?
有没有办法通过VBA中的ADODB连接使用LDAP从Active Directory服务检索当前登录用户的用户ID?
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.
我只看到了如何通过指定用户名和密码来查询有关用户的其他信息的示例。在这些示例中,通常使用Environ(“用户名”)检索用户名,但我的应用程序的某些用户使用VPN登录到网络,并且他们的Windows用户名可能与用于登录的用户名不同通过VPN进入网络。
Thanks!
谢谢!
1 个解决方案
#1
1
EDITED: Active Directory by itself doesn't know if someone is logged in. There's no way you can do something like:
编辑:Active Directory本身并不知道是否有人登录。你无法做到这样的事情:
ActiveDirectory.getIsThisUserLoggedIn("username");
Active Directory only acts as a mechanism for user metadata, security, and authentication.
Active Directory仅充当用户元数据,安全性和身份验证的机制。
#1
1
EDITED: Active Directory by itself doesn't know if someone is logged in. There's no way you can do something like:
编辑:Active Directory本身并不知道是否有人登录。你无法做到这样的事情:
ActiveDirectory.getIsThisUserLoggedIn("username");
Active Directory only acts as a mechanism for user metadata, security, and authentication.
Active Directory仅充当用户元数据,安全性和身份验证的机制。