Tell me more ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Best way to check if an user (not the current user), inserted in a ADGroup, belongs, or not, to SPList/SPWeb RoleAssignments?

Impersonate an use the .ContainsCurrentUser method, brings access denied issues.

getting the SPGroup:

foreach (SPPrincipal oPrincipal in from SPRoleAssignment oRoleAssignment in roleAssignmentCollection select oRoleAssignment.Member)
{
   try
   {
       SPGroup oRoleGroup = (SPGroup)oPrincipal;
       (...)
}

...and in PS Scripting? Any clue?

share|improve this question

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.