Compartilhar via


SPClaimsAuthRoleProvider.FindUsersInRole Method

Gets an array of user names in a specified role where the user name matches the specified user name.

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

Syntax

'Declaration
Public Overrides Function FindUsersInRole ( _
    roleName As String, _
    usernameToMatch As String _
) As String()
'Usage
Dim instance As SPClaimsAuthRoleProvider
Dim roleName As String
Dim usernameToMatch As String
Dim returnValue As String()

returnValue = instance.FindUsersInRole(roleName, _
    usernameToMatch)
public override string[] FindUsersInRole(
    string roleName,
    string usernameToMatch
)

Parameters

  • usernameToMatch
    Type: System.String

    The user name to match. The name can include wildcard characters.

Return Value

Type: []
An array of user names in the role where the user name matches the usernameToMatch.

Remarks

This override gets the users in the role that match the name in the claims-based role provider that is not an SPClaimsAuthRoleProvider and is used by the current application.

Different claims-based role providers support different wildcard characters in the usernameToMatch parameter. It is the developer’s responsibility to determine which characters are supported in their application. For example, SqlRoleProvider supports the % character to match zero or more characters.

See Also

Reference

SPClaimsAuthRoleProvider Class

SPClaimsAuthRoleProvider Members

Microsoft.SharePoint.Administration.Claims Namespace