Share via


SPClaimProvider.FillSchema method

When implemented in a derived class, fills the schema of the entity. The schema is used by People Picker control to display the entity data.

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

Syntax

'Declaration
Protected MustOverride Sub FillSchema ( _
    schema As SPProviderSchema _
)
'Usage
Dim schema As SPProviderSchema

Me.FillSchema(schema)
protected abstract void FillSchema(
    SPProviderSchema schema
)

Parameters

Remarks

Claims can be displayed in the People Picker control and that implementation is sometimes referred to as a claims picker. If you want to implement a claims picker, you must implement this method. In addition, you must also implement FillClaimTypes(), FillClaimValueTypes(), and FillEntityTypes() methods in the SPClaimProvider, class.For more information, see How to: Create a claims provider in SharePoint 2013.

In the following example, the FillSchema method returns two schema elements: Email and JobTitle (these are fields in the [T:HYPERLINK"mk:@MSITStore:D:\\\\aSDK\\\\SPF14.chm::/html/a4bf54d0-29e5-e5c2-231e-b1b9f4728a7f.htm"Microsoft.SharePoint.WebControls.PeopleEditorEntityDataKeys] class). The claims provider will return to People Picker control the entities as well as the email and job title information.

Sample code provided by: Andy Li, Microsoft Corporation.

Examples

protected override void FillSchema(SPProviderSchema schema)
{
    schema.AddSchemaElement(new SPSchemaElement(PeopleEditorEntityDataKeys.Email,
                                                "Email",
                                                 SPSchemaElementType.TableViewOnly));
    schema.AddSchemaElement(new SPSchemaElement(PeopleEditorEntityDataKeys.JobTitle,
                                    "JobTitle",
                                     SPSchemaElementType.TableViewOnly));

}

See also

Reference

SPClaimProvider class

SPClaimProvider members

Microsoft.SharePoint.Administration.Claims namespace