check spgroup membership

we can use spgroup.containscurrentuser to check if current user is in each group, and we can use spweb.sitegroups to find out all the groups, so we can find out all the spgroups in a site collection where current user is member;

also, spuser.groups returns all the spgroups the user belongs to;

But, i find difference between these two methods: for some spgroup, i added Everyone into it. I can find myself member of the group with spgroups.containcurrentuser, even though i am not added into the group directly. But spuser.groups does not return this group for me.

January 8th, 2014 10:13am

This appears to be a known issue. See the comment posted at the bottom of this MSDN page that references this blog post (from the SharePoint 2007 days, but still valid and relevant today).
Free Windows Admin Tool Kit Click here and download it now
January 17th, 2014 10:33pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics