Compartilhar via


SPClaimsAuthRoleProvider.GetUsersInRole Method (SPWeb, String, Int32, Boolean)

Gets a list of the users in the specified role for the application represented by the ApplicationName property.

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

Syntax

'Declaration
Public Overridable Function GetUsersInRole ( _
    web As SPWeb, _
    roleName As String, _
    maxCount As Integer, _
    <OutAttribute> ByRef reachedMaxCount As Boolean _
) As SPPrincipalInfo()
'Usage
Dim instance As SPClaimsAuthRoleProvider
Dim web As SPWeb
Dim roleName As String
Dim maxCount As Integer
Dim reachedMaxCount As Boolean
Dim returnValue As SPPrincipalInfo()

returnValue = instance.GetUsersInRole(web, _
    roleName, maxCount, reachedMaxCount)
public virtual SPPrincipalInfo[] GetUsersInRole(
    SPWeb web,
    string roleName,
    int maxCount,
    out bool reachedMaxCount
)

Parameters

  • maxCount
    Type: System.Int32

    The maximum number of users to retrieve.

  • reachedMaxCount
    Type: System.Boolean

    Determines whether the number of the elements in the result reached the maximum number. This parameter is passed uninitialized.

Return Value

Type: []
The names of the users in the specified role.

Remarks

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

See Also

Reference

SPClaimsAuthRoleProvider Class

SPClaimsAuthRoleProvider Members

GetUsersInRole Overload

Microsoft.SharePoint.Administration.Claims Namespace