Share via


SPClaimProvider.FillEntityTypes method

When implemented in a derived class, specifies the set of possible entity types that the claims provider is supporting for display in the People Picker control.

Namespace:  Microsoft.SharePoint.Administration.Claims
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Protected MustOverride Sub FillEntityTypes ( _
    entityTypes As List(Of String) _
)
'Usage
Dim entityTypes As List(Of String)

Me.FillEntityTypes(entityTypes)
protected abstract void FillEntityTypes(
    List<string> entityTypes
)

Parameters

Remarks

You can generally think of the entity type as a principal type. The pre-defined entity types are defined in the various [T:HYPERLINK"ms-help://MS.SPF14SDK.en/SPF14MrefAdmin/html/ba710e89-6180-0fec-fb79-090451f9ee43.htm"Microsoft.SharePoint.Administration.Claims.SPClaimEntityTypes] class.

If you want to implement claim picking in the People Picker control, you must implement this method. In addition, you must also implement FillSchema(), FillClaimValueTypes(), and FillClaimTypes() methods in the SPClaimProvider class.

For more information about claims picking, see How to: Create a claims provider in SharePoint 2013 and Claims provider in SharePoint 2013.

The following example returns [P:HYPERLINK"mk:@MSITStore:D:\\\\aSDK\\\\SPF14.chm::/html/ba710e89-6180-0fec-fb79-090451f9ee43.htm"Microsoft.SharePoint.Administration.Claims.SPClaimEntityTypes.FormsRole] as the entity type. That means the claims from this claims provider work like roles in ASP.NET role provider and you will be able to use them as principals to secure SharePoint objects.

Sample code provided by: Andy Li, Microsoft Corporation.

Examples

protected override void FillEntityTypes(List<string> entityTypes)
{
    entityTypes.Add(SPClaimEntityTypes.FormsRole);
}

See also

Reference

SPClaimProvider class

SPClaimProvider members

Microsoft.SharePoint.Administration.Claims namespace