![](/img/trans.png)
[英]DirectorySearcher doesn't respect the SizeLimit property if the SizeLimit is 256 or over
[英]DirectorySearcher can't find fax property
我正在使用DirectorySearcher
查找有关当前用户的详细信息。
UserPrincipal u = UserPrincipal.Current;
DirectoryEntry? user = u.GetUnderlyingObject() as DirectoryEntry;
DirectorySearcher ds = new DirectorySearcher(user);
ds.PropertiesToLoad.AddRange(new[]
{
"fax", "displayName", "streetAddress", "department", "telephoneNumber"
});
var entry = ds.FindOne();
“传真”不在Property
集合中
我确认该值是在 AD 中设置的。
Powershell显示正确
PS C:\Users\Henrik Halbritter> get-aduser "Henrik Halbritter" -Property "fax" | select -Property fax
fax
---
0123456
而不是fax
,请尝试FacsimileTelephoneNumber
。 AD 属性名称的引用方式可能非常不一致。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.