Partilhar via


SPRoleAssignmentCollection.Remove Method (SPPrincipal)

Removes the specified user or group from the role assignment collection.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

Syntax

'Declaration
Public Sub Remove ( _
    member As SPPrincipal _
)
'Usage
Dim instance As SPRoleAssignmentCollection
Dim member As SPPrincipal

instance.Remove(member)
public void Remove(
    SPPrincipal member
)

Parameters

Exceptions

Exception Condition
InvalidOperationException

The HasUniqueRoleAssignments property of the ParentSecurableObject property is false.

Remarks

This method removes the user or group specified by the member parameter from the role assignment collection.

See Also

Reference

SPRoleAssignmentCollection Class

SPRoleAssignmentCollection Members

Remove Overload

Microsoft.SharePoint Namespace