Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I'm currently having an issue with SPUtility.GetPrincipalsInGroup, I've search here and on Google but I haven't found any explication for this behavior. I use the method to list Users that are part or the given AD Group but it seems that this method does not work for every group. It work very well for any AD group that I created myself but its does not work for the group "Domain Users" which was created automatically by the server. The method always returns and empty array, even if all the users created on the domain are automatically added to this group.

Anyone has can explain why it behave like this. Is there a difference between this group and the groups I created that I am not aware of that would explain this?

Thanks a lot.

Alex

Edit, I thought I found a way to do it but it only worked when using Windows Authentication, it didn't work at all when using Claims...

I'd still love to know the reason why SPUtility.GetPrincipalsInGroup won't work with "Domain Users" though =D It IS a Security Group from Active Directory so in my understanding it should work. Anyone know why it doesn't?

share|improve this question
    
We're running into then same problem. When using claims authentication and running SPUtility.GetPrincipalsInGroup for "c:0(.s|true" (= All authenticated users). The group type matches SPPrincipalType.SecurityGroup thus is a security group. Any idea on how to get this working is much appreciated. –  user15429 Mar 8 '13 at 12:53
add comment

1 Answer

SharePoint can only work with Security Groups from Active Directory. The groups that are not working are most likely distribution groups.

share|improve this answer
    
I also thought that could be it but I looked in our active directory and "Domain Users" is a Security-group with a global scope which works just fine with any AD group that I would create manually. "Domain Users" does contain all users that were created on the domain so I really don't get why SPUtility.GetPrincipalsInGroup returns 0 users. –  Alex Dec 6 '12 at 19:09
add comment

Your Answer

 
discard

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.