ProfileSubtypeManager class

Creates, deletes, retrieves, and manages profile subtypes for a profile type.

Inheritance hierarchy


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


<SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel := True)> _
<SharePointPermissionAttribute(SecurityAction.Demand, ObjectModel := True)> _
Public Class ProfileSubtypeManager
Dim instance As ProfileSubtypeManager
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel = true)]
[SharePointPermissionAttribute(SecurityAction.Demand, ObjectModel = true)]
public class ProfileSubtypeManager


The following sample demonstrates how to use the ProfileSubtypeManager to create both a user profile and an organization profile ProfileSubtype.

using Microsoft.Office.Server.UserProfiles;
using Microsoft.SharePoint;
namespace CreateSubtype
    class Program
        static void Main(string[] args)
            using (SPSite site = new SPSite("http://<servername>"))
                SPServiceContext context = SPServiceContext.GetContext(site);
                ProfileSubtypeManager psm = ProfileSubtypeManager.Get(context);
                // create a user profile subtype
                psm.CreateSubtype("Consultant", "Consultant Subtype", ProfileType.User);
                // create an organization profile subtype
                psm.CreateSubtype("Vendor", "Vendor Subtype", ProfileType.Organization);

Thread safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See also


ProfileSubtypeManager members

Microsoft.Office.Server.UserProfiles namespace