This topic has not yet been rated - Rate this topic

SPRoleAssignmentCollection.RemoveFromCurrentScopeOnly Method

SharePoint 2010

Removes the specified user or group from the current security scope.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online
public void RemoveFromCurrentScopeOnly(
	SPPrincipal member
)

Parameters

member
Type: Microsoft.SharePoint.SPPrincipal
The user or group to remove.
Exception Condition
InvalidOperationException

The HasUniqueRoleAssignments property of the ParentSecurableObject property is false.

This method does not remove the member from all subscopes. It should only be used when the specified member already has permission to the current security scope through membership in some External Group or SharePoint Group. You can call this method to clean up redundant role assignments for the specified member when the member already has permission through membership in some External Group or SharePoint Group.

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