2.2.7.6 Sec_SiteGroupsView

The Sec_SiteGroupsView is a view into site group information with one site group per row. Site groups available through this view are owned by a user or domain group, or by a site group. If a user or domain group owns the site group, the OwnerIsUser bit is set to 1, and the GroupID, GroupName, GroupDescription, GroupSiteID, GroupOwner and GroupOwnerIsUser fields are set to NULL.

If the site group is owned by a site group, the OwnerIsUser bit is set to 0, and the UserID, UserSID, UserName, UserLogin, UserEmail, UserNotes, UserSiteAdmin and UserDomainGroup are set to NULL. The Sec_SiteGroupsView table is defined using T-SQL syntax, as follows.

 VIEW Sec_SiteGroupsView(
       ID                                   int,
       Title                                nvarchar(255),
       Description                          nvarchar(512),
       SiteWebId                            uniqueidentifier,
       Owner                                int,
       OwnerIsUser                          bit,
       OwnerGlobal                          bit,
       Type                                 tinyint,
       Global                               bit,
       SiteID                               uniqueidentifier,
       UserID                               int,
       UserSID                              varbinary(512),
       UserName                             nvarchar(255),
       UserLogin                            nvarchar(255),
       UserEmail                            nvarchar(255),
       UserNotes                            nvarchar(1023),
       UserSiteAdmin                        bit,
       UserDomainGroup                      bit,
       UserFlags                            int,
       GroupID                              int,
       GroupName                            nvarchar(255),
       GroupDescription                     nvarchar(512),
       GroupSiteID                          uniqueidentifier,
       GroupOwner                           int,
       GroupOwnerIsUser                     bit,
       DLAlias                              nvarchar(128),
       DLErrorMessage                       nvarchar(512),
       DLFlags                              int,
       DLJobId                              int,
       DLArchives                           varchar(4000),
       RequestEmail                         nvarchar(255),
       Flags                                int
 );

ID: The identifier for the site group. This parameter MUST NOT be NULL.

Title: The user-friendly display name for the site group. This parameter MUST NOT be NULL.

Description: The site group description.

SiteWebId: The site collection identifier (section 2.2.1.9) of the site collection that contains the site group information. This value is the same as returned in SiteId. For non-user-owned groups, this column name will be WebId. This parameter MUST NOT be NULL.

Owner: The user identifier (section 2.2.1.13) or site group identifier (section 2.2.1.10) of the site group owner. This parameter MUST NOT be NULL.

OwnerIsUser: A bit flag specifying whether the site group owner is a user or a site group. When the value in the Owner field is a user identifier for a user or a domain group, the OwnerIsUser flag MUST be set to 1. When the value in the Owner field is a site group identifier, the OwnerIsUser flag MUST be set to 0. This parameter MUST NOT be NULL.

OwnerGlobal: A bit flag specifying whether the view contains ownership information for a user or domain group, or for a site group.

When the owner is a site group, the OwnerGlobal flag MUST be set to 1, and the GroupID, GroupName, GroupDescription, GroupSiteID, GroupOwner and GroupOwnerIsUser fields MUST be populated with information from the site group owning this site group, and the UserID, UserSID, UserName, UserLogin, UserEmail, UserNotes, UserSiteAdmin and UserDomainGroup MUST be NULL.

When the owner is a user or domain group, the OwnerGlobal flag MUST be set to 0, the UserID, UserSID, UserName, UserLogin, UserEmail, UserNotes, UserSiteAdmin and UserDomainGroup MUST be populated with information from the user or domain group owning this site group, and the GroupID, GroupName, GroupDescription, GroupSiteID, GroupOwner and GroupOwnerIsUser MUST be NULL.

Type: This value MUST be 0.

Global: This value MUST be 1.

SiteID: The site collection identifier (section 2.2.1.9) of the site collection. This parameter MUST NOT be NULL.

UserID: The user identifier of the owner of the site group. This MUST be NULL when the site group owner is a site group.

UserSID: The SystemID (section 2.2.1.12) of the owner of the site group. This MUST be NULL when the site group owner is a site group.

UserName: The user-friendly name of the owner of the site group. This MUST be NULL when the site group owner is a site group.

UserLogin: The login name of the owner of the site group. This MUST be NULL when the site group owner is a site group.

UserEmail: The email address of the owner of the site group. This MUST be NULL when the site group owner is a site group.

UserNotes: The notes associated with the owner of the site group. This MUST be NULL when the site group owner is a site group.

UserSiteAdmin: A bit flag specifying whether the site group owner is a site collection administrator. When the site group owner is a site collection administrator, the UserSiteAdmin flag MUST be set to 1. If the user or domain group owner of the site group is not a site collection administrator, the UserSiteAdmin flag MUST be set to 0. This MUST be NULL when the site group owner is a site group.

UserDomainGroup: A bit flag specifying whether the site group owner is a domain group. When the site group owner is a domain group, the flag MUST be set to 1. When the site group owner is a user or domain group, the flag MUST be set to 0. This flag MUST be NULL when the site group owner is a site group.

UserFlags: Contains the UserInfo Flags (section 2.2.2.11) value describing the owner of the site group. This MUST be NULL when the site group owner is a site group.

GroupID: The site group identifier (section 2.2.1.10) of the owner of this site group. This MUST be NULL when the site group owner is a user or domain group.

GroupName: The user-friendly name of the owner of this site group. This MUST be NULL when the site group owner is a user or domain group.

GroupDescription: The description of the owner of this site group. This MUST be NULL when the site group owner is a user or domain group.

GroupSiteID: The site collection identifier (section 2.2.1.9) of the site collection containing the owner of this site group. This MUST be NULL when the site group owner is a user or domain group.

GroupOwner: The user identifier (section 2.2.1.13) or site group identifier of the owner of the site group that owns this site group. This MUST be NULL when the site group owner is a user or domain group, because only an owner that is a site group can have a group owner.

GroupOwnerIsUser: A bit flag specifying whether the site group that owns this site group is in turn owned by a user or domain group, or by a site group. When the owner of the site group that owns this site group is a user or domain group, the GroupOwnerIsUser flag MUST be set to 1. This flag MUST be set to 0 when the site group owner is owned by a site group. This MUST be NULL when the site group owner is a user or domain group.

DLAlias: The email distribution list address for the site group. This value MUST be NULL if the group has no email distribution list address.

DLErrorMessage: Contains the most recent error message returned by an asynchronous email distribution list operation, if any.

DLFlags: Contains a bit field of status flags for the email distribution list associated with this site group. This parameter MUST be one of the values listed in the following table.

Value

Description

0x00000000

None.

0x00000001

Pending - If this bit is set, the email distribution list associated with this site group currently has a pending asynchronous operation.

0x00000002

Dirty - If this bit is set, the email distribution list associated with this group is dirty.

The email distribution list is considered dirty when

A) an asynchronous operation is pending, and

B) the site group has been modified since the asynchronous operation was initiated. A dirty email distribution list needs to have its status and membership synchronized as soon as the pending operation completes (whether it succeeds or fails).

0x00000004

PendingJobIsRename - The type of the currently pending asynchronous email distribution list operation, if any. When this bit is set, the pending operation is a Rename. When the bit is not set, it is a Create operation.

DLJobId: Contains the job ID of the currently pending asynchronous email distribution list operation or 0 if there is no pending operation.

DLArchives: An array of bytes containing a list of pairs of list identifiers (section 2.2.1.5) defining additional lists, which are recipients of email sent to the email distribution list via the address in DLAlias. Each Identifier MUST be stored as a string, with commas separating the list's parent site document identifier (section 2.2.1.2) and the list identifier, and with semicolons following each pair.

RequestEmail: The email address used to send a request to join or depart a site group.

Flags: Contains the membership permissions bit field for the site group. This parameter MUST NOT be NULL and MUST be one of the values listed in the following table.

Value

Description

0x00000000

Allow anyone to view the membership of the site group.

0x00000001

Only allow members of the site group to view the membership.

0x00000002

Allow members of the site group to edit the membership of the site group.

0x00000004

Allow users to request membership in this site group, and allow users to request to leave the site group. All requests MUST be sent to the email address specified by RequestEmail.

0x00000008

Automatically accept user requests to join or leave the site group. This bit MUST be set only when the bit 0x00000004 is also set.