Share via


SPClaimProvider.FillResolve method (Uri, String[], String, List<PickerEntity>)

When implemented in a derived class, resolves claims by using the type-in control of the claims picker.

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

Syntax

'Declaration
Protected MustOverride Sub FillResolve ( _
    context As Uri, _
    entityTypes As String(), _
    resolveInput As String, _
    resolved As List(Of PickerEntity) _
)
'Usage
Dim context As Uri
Dim entityTypes As String()
Dim resolveInput As String
Dim resolved As List(Of PickerEntity)

Me.FillResolve(context, entityTypes, _
    resolveInput, resolved)
protected abstract void FillResolve(
    Uri context,
    string[] entityTypes,
    string resolveInput,
    List<PickerEntity> resolved
)

Parameters

  • context
    Type: System.Uri

    The context, as a URI. This must be a properly formatted URI.

  • entityTypes
    Type: []

    The [P:HYPERLINK"mk:@MSITStore:D:\\\\aSDK\\\\SP2010SDK.chm::/html/a4bf54d0-29e5-e5c2-231e-b1b9f4728a7f.htm"Microsoft.SharePoint.WebControls.PickerEntity.EntityType] entity types that are returned on the SPProviderHierarchyTree tree.

  • resolveInput
    Type: System.String

    A single claim to be resolved.

  • resolved
    Type: System.Collections.Generic.List<PickerEntity>

    A list of picker entities with [T:HYPERLINK"ms-help://MS.SPF14SDK.en/SPF14MrefAdmin/html/b09ae0ba-e07b-fdf5-9209-1743dacba588.htm"Microsoft.SharePoint.Administration.Claims.SPClaim] populated.

Remarks

Claims can be displayed in the People Picker control through claims picking. Claims picking allows an application to surface claims in the People Picker control.In claims picking, a claims provider provides listing, resolve, search and friendly display of claims functionality in the People Picker control.

A People Picker with claims picking functionality is sometimes referred to as a claim picker. If you want to be able to resolve claims by using the type-in control of the claims picker, you must implement this method and implement the SupportResolv() property to return true.

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

The following is an example of how to implement name resolution as well as returning the entity to the People Picker window.

Sample code provided by: Andy Li, Microsoft Corporation.

Examples

protected override void FillResolve(Uri context, string[] entityTypes, string resolveInput, List<PickerEntity> resolved)
        {
            if (resolveInput.ToUpper() == "SALESMANAGER")
            {
                PickerEntity entity = CreatePickerEntity();
                entity.Claim = CreateClaim(CRMClaimType.Role, CRMRoleValue.SalesManager, Microsoft.IdentityModel.Claims.ClaimValueTypes.String);
                entity.Description = CRMRoleValue.SalesManager;
                entity.DisplayText = CRMRoleValue.SalesManager;
                entity.EntityData[PeopleEditorEntityDataKeys.DisplayName] = CRMRoleValue.SalesManager;
                entity.EntityType = SPClaimEntityTypes.FormsRole;
                entity.IsResolved = true;
                resolved.Add(entity);
            }
            if (resolveInput.ToUpper() == "REGIONMANAGER")
            {
                PickerEntity entity = CreatePickerEntity();
                entity.Claim = CreateClaim(CRMClaimType.Role, CRMRoleValue.RegionManager, Microsoft.IdentityModel.Claims.ClaimValueTypes.String);
                entity.Description = CRMRoleValue.RegionManager;
                entity.DisplayText = CRMRoleValue.RegionManager;
                entity.EntityData[PeopleEditorEntityDataKeys.DisplayName] = CRMRoleValue.RegionManager;
                entity.EntityType = SPClaimEntityTypes.FormsRole;
                entity.IsResolved = true;
                resolved.Add(entity);
            }

See also

Reference

SPClaimProvider class

SPClaimProvider members

FillResolve overload

Microsoft.SharePoint.Administration.Claims namespace