我一直在尝试使用COM接口获取所有RoleAssignments。问题是我获得了AD用户组名称而不是组内的实际用户。
我的代码看起来像这样:
ClientContext cc = new ClientContext(#SiteURL);
RoleAssignmentCollection Roles = cc.Web.RoleAssignments;
IEnumerable<RoleAssignment> newRoleAssignmentsCollection = cc.LoadQuery(Role.Include(role => role.Member));
AsyncDelegate execDel = new AsyncDelegate(cc.ExecuteQuery);
execDel.BeginInvoke(arg => { cc.ExecuteQuery();
foreach (RoleAssignment RoleAssign in newRoleAssignmentsCollection)
{
RoleAssign.Member.LoginName; // <------- Here is my problem!!!
}
}, null);
有人可以告诉我如何获取Active Directory组内的用户吗?
先谢谢,Itay。