查找在Active Directory用户的经理纪录纪录、经理、用户、Active

2023-09-09 21:35:11 作者:萌酱

使用Active Directory,我试图找到SAM帐户和用户的经理的电子邮件。

Using Active Directory, am trying to find the SamAccountName and email of the user’s manager.

我发现通过搜索,其中sAMAccountName赋=域\帐户在AD中登录的用户。然后,我检索了经理属性,它看起来是这样的,例如:

I find the logged on user in the AD by search where sAMAccountName = Domain\Account. I then retrieve the manager property, which looks like this, for example:

CN=Doe\, Jane E.,OU=Employees,OU=Users,OU=Detroit,OU=United States,DC=na,DC=gmc,DC=gmc,DC=com"

我如何使用这个presumed键查找此人的用户记录?我会匹配什么领域呢?

How can I use this presumed key to find the user record for this person? What field would I match on?

推荐答案

如果我没记错的话,那是他们的专有名称,这意味着你可以使用它作为直接引用他们的个人资料

If I remember correctly, that is their Distinguished Name, which means you can use it as the direct reference to their profile

LDAP://CN=Doe, Jane E.,OU=Employees,OU=Users,OU=Detroit,OU=United States,DC=na,DC=gmc,DC=gmc,DC=com

我也觉得如果配置文件存在,它会返回该名称。如果它已被删除,那么我相信它运行某种形式的GUID(基于内存 - 这可能是不正确的)

I also think it will return that name if the profile exists. If it has been deleted then I believe it runs a GUID of some sort (based on memory - this might be incorrect)