MemberGroupManager.CreateMemberGroup Method

Creates a member group.

Namespace:  Microsoft.Office.Server.UserProfiles
Assembly:  Microsoft.Office.Server (in Microsoft.Office.Server.dll)


Public Function CreateMemberGroup ( _
    source As Guid, _
    displayName As String, _
    mailNickName As String, _
    description As String, _
    url As String, _
    sourceReference As String _
) As MemberGroup
Dim instance As MemberGroupManager
Dim source As Guid
Dim displayName As String
Dim mailNickName As String
Dim description As String
Dim url As String
Dim sourceReference As String
Dim returnValue As MemberGroup

returnValue = instance.CreateMemberGroup(source, _
    displayName, mailNickName, description, _
    url, sourceReference)
public MemberGroup CreateMemberGroup(
    Guid source,
    string displayName,
    string mailNickName,
    string description,
    string url,
    string sourceReference


  • displayName
    Type: System.String
    The display name for the new member group.
  • mailNickName
    Type: System.String
    The mail nick name for the new member group.
  • sourceReference
    Type: System.String
    The membership source unique reference for the member group.

Return Value

Type: Microsoft.Office.Server.UserProfiles.MemberGroup
The MemberGroup object.


The membership source uses the SourceReference value to uniquely reference the group. For example, the membership source unique reference for the Active Directory directory service is the distinguished name. For SharePoint sites, it is the ID.

The source type of a membership can be a distribution list, a SharePoint site, or a custom membership source. For more information, see the MembershipSource enumeration.

For more information about types of membership groups, see Memberships Overview. For a code example about how to create a member group and add a member to the newly created group, see How to: Create Memberships.

See Also


MemberGroupManager Class

MemberGroupManager Members

Microsoft.Office.Server.UserProfiles Namespace