Compartilhar via


SPClaimsAuthRoleProvider.AddUsersToRoles Method

Adds the specified user names to the specified roles for the application represented by the ApplicationName property.

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

Syntax

'Declaration
Public Overrides Sub AddUsersToRoles ( _
    usernames As String(), _
    roleNames As String() _
)
'Usage
Dim instance As SPClaimsAuthRoleProvider
Dim usernames As String()
Dim roleNames As String()

instance.AddUsersToRoles(usernames, roleNames)
public override void AddUsersToRoles(
    string[] usernames,
    string[] roleNames
)

Parameters

  • usernames
    Type: []

    The user names to add to the roles.

  • roleNames
    Type: []

    The role names to which the specified user names are added.

Remarks

This override adds the users to the roles 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

Microsoft.SharePoint.Administration.Claims Namespace