" Live as if you were to die tomorrow. Learn as if you were to live forever.. "
- Mahatma Gandhi
Using SharePoint object model we can pull out all the cross-site groups either by using SPWeb.Groups or by using SPWeb.SiteGroups. Then what is the difference between the two?
SPWeb.Groups will allow you to pull out only the groups which have some / any kind of permissions defined within the site.
SPWeb.SiteGroups will pull out all the cross-site groups irrespective of any permission defined.
So, the next time you try to pull out the Groups using SPWeb.Groups, you will not get astonished by not finding few of the Groups within the retrieved collection.
Note: The same also applies to the cross-site user collection retrieval using either SPWeb.Users or SPWeb.SiteUsers.
Mail (will not be published) (required)
Enter Captcha Code *
5 − three =
Burn Ignorance is a knowledge initiative by Mindfire Solutions
Subscribe to our mailing list to get the updates to your email inbox...