获取组织的企业领域? [英] Get company field of organization?

查看:142
本文介绍了获取组织的企业领域?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否有人知道如何使用,以获得组织企业实地 DirectorySearcher从 PrincipalSearcher

I would like to know if anyone knows how to get company field of organization using DirectorySearcher or PrincipalSearcher?

感谢了很多,

维克托·卡斯特罗

推荐答案

加入公司的DirectorySearcher从的PropertiesToLoad属性:

Add "company" to the PropertiesToLoad property of the DirectorySearcher:

var ds = new DirectorySearcher(ldapRoot);
ds.PropertiesToLoad.Add("company");
var directoryEntry = ds.FindOne();
...
Console.WriteLine(directoryEntry.Properties["company"]);

这篇关于获取组织的企业领域?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆