{"id":1021,"date":"2010-05-26T16:25:01","date_gmt":"2010-05-26T21:25:01","guid":{"rendered":"http:\/\/blogs.devhorizon.com\/reza\/?p=1021"},"modified":"2010-05-28T22:56:18","modified_gmt":"2010-05-29T03:56:18","slug":"note-to-self-the-difference-between-spwebsitegroups-spwebgroups","status":"publish","type":"post","link":"https:\/\/blogs.devhorizon.com\/reza\/2010\/05\/26\/note-to-self-the-difference-between-spwebsitegroups-spwebgroups\/","title":{"rendered":"Note to Self: The Difference between SPWeb.SiteGroups &#038; SPWeb.Groups"},"content":{"rendered":"<p>This came up a few times and I seem to forget it after a while:<\/p>\n<ol>\n<li><a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/microsoft.sharepoint.spweb.sitegroups.aspx\">SPWeb.SiteGroups<\/a>: As the documentation says this gets you a collection of cross-site groups for the site collection.\u00a0These groups are cross-site, because they can be used in more than one SPWeb object in the site collection.<\/li>\n<li><a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/microsoft.sharepoint.spweb.groups.aspx\">SPWeb.Groups<\/a>: This returns a subset of the groups above (SPWeb.SiteGroups) that are used in the specified SPWeb object. The word &#8220;used&#8221; is important to note here. These are the groups that are referenced somewhere in the site. For example, in a securable object such as an SPList or SPListItem with broken inheritance.<\/li>\n<\/ol>\n<p>So, the logical conclusion is that:\u00a0 SPWeb.SiteGroups &gt;= SPWeb.Groups.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This came up a few times and I seem to forget it after a while: SPWeb.SiteGroups: As the documentation says this gets you a collection of cross-site groups for the site collection.\u00a0These groups are cross-site, because they can be used in more than one SPWeb object in the site collection. SPWeb.Groups: This returns a subset [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[43,36],"tags":[],"class_list":["post-1021","post","type-post","status-publish","format-standard","hentry","category-moss-2007","category-sharepoint-2010"],"_links":{"self":[{"href":"https:\/\/blogs.devhorizon.com\/reza\/wp-json\/wp\/v2\/posts\/1021","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.devhorizon.com\/reza\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.devhorizon.com\/reza\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.devhorizon.com\/reza\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.devhorizon.com\/reza\/wp-json\/wp\/v2\/comments?post=1021"}],"version-history":[{"count":0,"href":"https:\/\/blogs.devhorizon.com\/reza\/wp-json\/wp\/v2\/posts\/1021\/revisions"}],"wp:attachment":[{"href":"https:\/\/blogs.devhorizon.com\/reza\/wp-json\/wp\/v2\/media?parent=1021"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.devhorizon.com\/reza\/wp-json\/wp\/v2\/categories?post=1021"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.devhorizon.com\/reza\/wp-json\/wp\/v2\/tags?post=1021"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}