SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
up vote 0 down vote accepted

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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