Partager via


AssociatedOwnerGroup in SharePoint

Every Site has 3 Site Groups that are associated Site Groups: Visitors (AssociatedVisitorsGroup), Members (AssociatedMemberGroup) and Owners(AssociatedOwnerGroup). These are the 3 types of groups associated with any SPWeb. Now if at all you are using AssociatedOwnerGroup property of SPWeb programmatically in the code and its necessary that theses 3 groups (i.e. Visitors, Members and Owners) are associated with an SPWeb. The association can be checked in the following People and Groups as shown below. If the the association of these 3 groups is not there then if you check programmatically for the AssociatedOwnerGroup property of the SPWeb it would not return any results and your code might fail even after having users with Site Owners (or Full Control permission to say), as having groups with Full Control permissions are still not the AssociatedOwnerGroup or AssociatedVisitorGroup/AssociatedMemberGroup. So remember if you are checking of any Associated Groups of SPWeb first have them created and associated with the site itself as shown below: