1

I've been trying to get all the RoleAssignments using the COM interface. the problem is that i get the AD user group names instead of the actual users inside the groups.

my code looks something like this:

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);

Can anyone please tell me how to get the users which are inside the Active Directory group?

Thanks in advance, Itay.

0

Are you saying that you have AD groups assigned permissions in that site and you want to know the names of the users that are members of the AD group?

If so, SharePoint doesn't know that information, you need to query it from AD directly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.