SPRoleAssignment.Update Method

Updates the role assignment object with changes that have been made to its properties.

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

Syntax

'Declaration
<ClientCallableAttribute> _
<ClientCallableExceptionConstraintAttribute(FixedId := "System.InvalidOperationException$0",  _
    ErrorType := GetType(InvalidOperationException), ErrorCode := , Condition := "The Parent Securable object does not have Unique Permissions")> _
<ClientCallableExceptionConstraintAttribute(FixedId := "System.UnauthorizedAccessException$-2147024891",  _
    ErrorType := GetType(UnauthorizedAccessException), Condition := "")> _
Public Sub Update
'Usage
Dim instance As SPRoleAssignment

instance.Update()
[ClientCallableAttribute]
[ClientCallableExceptionConstraintAttribute(FixedId = "System.InvalidOperationException$0", ErrorType = typeof(InvalidOperationException), 
    ErrorCode = , Condition = "The Parent Securable object does not have Unique Permissions")]
[ClientCallableExceptionConstraintAttribute(FixedId = "System.UnauthorizedAccessException$-2147024891", 
    ErrorType = typeof(UnauthorizedAccessException), Condition = "")]
public void Update()

Exceptions

Exception Condition
ArgumentException

The ParentSecurableObject property is null .

Remarks

You can only call the Update method for an SPRoleAssignment object that is part of an SPRoleAssignmentCollection that in turn is bound to a Microsoft SharePoint Foundation object that implements the ISecurableObject interface (for example, SPWeb).

See Also

Reference

SPRoleAssignment Class

SPRoleAssignment Members

Microsoft.SharePoint Namespace