简体   繁体   English

C#通讯组列表属性(活动目录)

[英]C# Distribution list attributes (active directory)

嗨,我正在尝试使用LDAP更新我的通讯组列表管理员,并且我需要知道“管理员可以更新成员列表”复选框的属性是什么,我只想使用c#NOT vbs或powershell可以更新菜单,但是我更喜欢你写它为例..

The simple answer is there is no attribute for the "Manager can update membership list" checkbox, the check box is a security setting. 简单的答案是“管理器可以更新成员资格列表”复选框没有属性,该复选框是安全设置。 When you check it the security of the group is modified to include the manager with the required permissions, unticking removes the managers rights under the security tab to modify the group. 选中该选项后,将修改组的安全性以包括具有所需权限的管理员,取消选中将删除“安全性”选项卡下的管理员权限以修改组。

You can use the ObjectSecurity to see if a SID has a unique ACL entry, in a standard environment this should be enough. 您可以使用ObjectSecurity来查看SID是否具有唯一的ACL条目,在标准环境中,这应该足够了。 This code should give you an idea of how to do it. 此代码应使您了解如何执行此操作。

NTAccount acc = new NTAccount(managersam); 
SecurityIdentifier sid = (SecurityIdentifier)acc.Translate(typeof(SecurityIdentifier)); 
ActiveDirectorySecurity sdc = YourGroupObject.ObjectSecurity; 
AuthorizationRuleCollection arc= sdc.GetAccessRules(true, false, Type.GetType("System.Security.Principal.SecurityIdentifier")); 
foreach (AuthorizationRule ar in arc) {
   if (ar.IdentityReference== sid
   {
     managercanedit= true;
   }
 }

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM