This topic has not yet been rated - Rate this topic

SPRoleAssignmentCollection.RemoveById Method

Removes the user or group with the specified identifier (ID) from the role assignment collection.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online
public void RemoveById(
	int Id
)

Parameters

Id
Type: System.Int32
The ID of the user or group to remove. The value of the ID does not correspond to the index of the role definition within the collection.
Exception Condition
InvalidOperationException

The HasUniqueRoleAssignments property of the ParentSecurableObject property is false.

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

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ