Search Results for

    Show / Hide Table of Contents

    Interface ISecurableObject

    Defines the properties and methods for securable object (Web, List, ListItem)

    Namespace: PnP.Core.Model.SharePoint
    Assembly: PnP.Core.dll
    Syntax
    public interface ISecurableObject

    Properties

    HasUniqueRoleAssignments

    Returns if the securable object has unique role assignments

    Declaration
    bool HasUniqueRoleAssignments { get; }
    Property Value
    System.Boolean

    RoleAssignments

    Role Assignments defined on this securable object Implements .
    See Requesting model collections and IQueryable performance considerations to learn more.

    Declaration
    IRoleAssignmentCollection RoleAssignments { get; }
    Property Value
    IRoleAssignmentCollection

    Methods

    AddRoleDefinition(Int32, IRoleDefinition)

    Add role definitions for a specific principal id (IUser.Id or ISharePointGroup.Id)

    Declaration
    void AddRoleDefinition(int principalId, IRoleDefinition roleDefinition)
    Parameters
    System.Int32 principalId

    IRoleDefinition roleDefinition

    Role definition to add

    AddRoleDefinitionAsync(Int32, IRoleDefinition)

    Adds role definitions for a specific principal id (IUser.Id or ISharePointGroup.Id)

    Declaration
    Task AddRoleDefinitionAsync(int principalId, IRoleDefinition roleDefinition)
    Parameters
    System.Int32 principalId

    IRoleDefinition roleDefinition

    Role definition to add

    Returns
    Task

    AddRoleDefinitionBatch(Batch, Int32, IRoleDefinition)

    Add role definitions for a specific principal id (IUser.Id or ISharePointGroup.Id)

    Declaration
    void AddRoleDefinitionBatch(Batch batch, int principalId, IRoleDefinition roleDefinition)
    Parameters
    Batch batch

    The batch to add this request to

    System.Int32 principalId

    IRoleDefinition roleDefinition

    Role definition to add

    AddRoleDefinitionBatch(Int32, IRoleDefinition)

    Add role definitions for a specific principal id (IUser.Id or ISharePointGroup.Id)

    Declaration
    void AddRoleDefinitionBatch(int principalId, IRoleDefinition roleDefinition)
    Parameters
    System.Int32 principalId

    IRoleDefinition roleDefinition

    Role definition to add

    AddRoleDefinitionBatchAsync(Batch, Int32, IRoleDefinition)

    Adds role definitions for a specific principal id (IUser.Id or ISharePointGroup.Id)

    Declaration
    Task AddRoleDefinitionBatchAsync(Batch batch, int principalId, IRoleDefinition roleDefinition)
    Parameters
    Batch batch

    The batch to add this request to

    System.Int32 principalId

    IRoleDefinition roleDefinition

    Role definition to add

    Returns
    Task

    AddRoleDefinitionBatchAsync(Int32, IRoleDefinition)

    Adds role definitions for a specific principal id (IUser.Id or ISharePointGroup.Id)

    Declaration
    Task AddRoleDefinitionBatchAsync(int principalId, IRoleDefinition roleDefinition)
    Parameters
    System.Int32 principalId

    IRoleDefinition roleDefinition

    Role definition to add

    Returns
    Task

    AddRoleDefinitions(Int32, String[])

    Adds roles for a specific principal id (IUser.Id or ISharePointGroup.Id)

    Declaration
    bool AddRoleDefinitions(int principalId, params string[] names)
    Parameters
    System.Int32 principalId

    Id of the user or group

    System.String[] names

    Roles to add

    Returns
    System.Boolean

    AddRoleDefinitionsAsync(Int32, String[])

    Adds roles for a specific principal id (IUser.Id or ISharePointGroup.Id)

    Declaration
    Task<bool> AddRoleDefinitionsAsync(int principalId, params string[] names)
    Parameters
    System.Int32 principalId

    Id of the user or group

    System.String[] names

    Roles to add

    Returns
    Task<System.Boolean>

    BreakRoleInheritance(Boolean, Boolean)

    Creates unique role assignments for this securable object.

    Declaration
    void BreakRoleInheritance(bool copyRoleAssignments, bool clearSubscopes)
    Parameters
    System.Boolean copyRoleAssignments

    Specifies whether to copy the role assignments from the parent securable object. If the value is false, the collection of role assignments must contain only 1 role assignment containing the current user after the operation.

    System.Boolean clearSubscopes

    If the securable object is a site, and the clearsubscopes parameter is true, the role assignments for all child securable objects in the current site and in the sites which inherit role assignments from the current site must be cleared and those securable objects will inherit role assignments from the current site after this call. If the securable object is a site, and the clearsubscopes parameter is false, the role assignments for all child securable objects which do not inherit role assignments from their parent object must remain unchanged. If the securable object is not a site, and the clearsubscopes parameter is true, the role assignments for all child securable objects must be cleared and those securable objects will inherit role assignments from the current securable object after this call. If the securable object is not a site, and the clearsubscopes parameter is false, the role assignments for all child securable objects which do not inherit role assignments from their parent object must remain unchanged.

    BreakRoleInheritanceAsync(Boolean, Boolean)

    Creates unique role assignments for this securable object.

    Declaration
    Task BreakRoleInheritanceAsync(bool copyRoleAssignments, bool clearSubscopes)
    Parameters
    System.Boolean copyRoleAssignments

    Specifies whether to copy the role assignments from the parent securable object. If the value is false, the collection of role assignments must contain only 1 role assignment containing the current user after the operation.

    System.Boolean clearSubscopes

    If the securable object is a site, and the clearsubscopes parameter is true, the role assignments for all child securable objects in the current site and in the sites which inherit role assignments from the current site must be cleared and those securable objects will inherit role assignments from the current site after this call. If the securable object is a site, and the clearsubscopes parameter is false, the role assignments for all child securable objects which do not inherit role assignments from their parent object must remain unchanged. If the securable object is not a site, and the clearsubscopes parameter is true, the role assignments for all child securable objects must be cleared and those securable objects will inherit role assignments from the current securable object after this call. If the securable object is not a site, and the clearsubscopes parameter is false, the role assignments for all child securable objects which do not inherit role assignments from their parent object must remain unchanged.

    Returns
    Task

    BreakRoleInheritanceBatch(Batch, Boolean, Boolean)

    Creates unique role assignments for this securable object.

    Declaration
    void BreakRoleInheritanceBatch(Batch batch, bool copyRoleAssignments, bool clearSubscopes)
    Parameters
    Batch batch

    Batch add this request to

    System.Boolean copyRoleAssignments

    Specifies whether to copy the role assignments from the parent securable object. If the value is false, the collection of role assignments must contain only 1 role assignment containing the current user after the operation.

    System.Boolean clearSubscopes

    If the securable object is a site, and the clearsubscopes parameter is true, the role assignments for all child securable objects in the current site and in the sites which inherit role assignments from the current site must be cleared and those securable objects will inherit role assignments from the current site after this call. If the securable object is a site, and the clearsubscopes parameter is false, the role assignments for all child securable objects which do not inherit role assignments from their parent object must remain unchanged. If the securable object is not a site, and the clearsubscopes parameter is true, the role assignments for all child securable objects must be cleared and those securable objects will inherit role assignments from the current securable object after this call. If the securable object is not a site, and the clearsubscopes parameter is false, the role assignments for all child securable objects which do not inherit role assignments from their parent object must remain unchanged.

    BreakRoleInheritanceBatch(Boolean, Boolean)

    Creates unique role assignments for this securable object.

    Declaration
    void BreakRoleInheritanceBatch(bool copyRoleAssignments, bool clearSubscopes)
    Parameters
    System.Boolean copyRoleAssignments

    Specifies whether to copy the role assignments from the parent securable object. If the value is false, the collection of role assignments must contain only 1 role assignment containing the current user after the operation.

    System.Boolean clearSubscopes

    If the securable object is a site, and the clearsubscopes parameter is true, the role assignments for all child securable objects in the current site and in the sites which inherit role assignments from the current site must be cleared and those securable objects will inherit role assignments from the current site after this call. If the securable object is a site, and the clearsubscopes parameter is false, the role assignments for all child securable objects which do not inherit role assignments from their parent object must remain unchanged. If the securable object is not a site, and the clearsubscopes parameter is true, the role assignments for all child securable objects must be cleared and those securable objects will inherit role assignments from the current securable object after this call. If the securable object is not a site, and the clearsubscopes parameter is false, the role assignments for all child securable objects which do not inherit role assignments from their parent object must remain unchanged.

    BreakRoleInheritanceBatchAsync(Batch, Boolean, Boolean)

    Creates unique role assignments for this securable object.

    Declaration
    Task BreakRoleInheritanceBatchAsync(Batch batch, bool copyRoleAssignments, bool clearSubscopes)
    Parameters
    Batch batch

    Batch add this request to

    System.Boolean copyRoleAssignments

    Specifies whether to copy the role assignments from the parent securable object. If the value is false, the collection of role assignments must contain only 1 role assignment containing the current user after the operation.

    System.Boolean clearSubscopes

    If the securable object is a site, and the clearsubscopes parameter is true, the role assignments for all child securable objects in the current site and in the sites which inherit role assignments from the current site must be cleared and those securable objects will inherit role assignments from the current site after this call. If the securable object is a site, and the clearsubscopes parameter is false, the role assignments for all child securable objects which do not inherit role assignments from their parent object must remain unchanged. If the securable object is not a site, and the clearsubscopes parameter is true, the role assignments for all child securable objects must be cleared and those securable objects will inherit role assignments from the current securable object after this call. If the securable object is not a site, and the clearsubscopes parameter is false, the role assignments for all child securable objects which do not inherit role assignments from their parent object must remain unchanged.

    Returns
    Task

    BreakRoleInheritanceBatchAsync(Boolean, Boolean)

    Creates unique role assignments for this securable object.

    Declaration
    Task BreakRoleInheritanceBatchAsync(bool copyRoleAssignments, bool clearSubscopes)
    Parameters
    System.Boolean copyRoleAssignments

    Specifies whether to copy the role assignments from the parent securable object. If the value is false, the collection of role assignments must contain only 1 role assignment containing the current user after the operation.

    System.Boolean clearSubscopes

    If the securable object is a site, and the clearsubscopes parameter is true, the role assignments for all child securable objects in the current site and in the sites which inherit role assignments from the current site must be cleared and those securable objects will inherit role assignments from the current site after this call. If the securable object is a site, and the clearsubscopes parameter is false, the role assignments for all child securable objects which do not inherit role assignments from their parent object must remain unchanged. If the securable object is not a site, and the clearsubscopes parameter is true, the role assignments for all child securable objects must be cleared and those securable objects will inherit role assignments from the current securable object after this call. If the securable object is not a site, and the clearsubscopes parameter is false, the role assignments for all child securable objects which do not inherit role assignments from their parent object must remain unchanged.

    Returns
    Task

    GetRoleDefinitions(Int32)

    Returns the roles for a specific principal id (IUser.Id or ISharePointGroup.Id)

    Declaration
    IRoleDefinitionCollection GetRoleDefinitions(int principalId)
    Parameters
    System.Int32 principalId

    Id of the user or group

    Returns
    IRoleDefinitionCollection

    GetRoleDefinitionsAsync(Int32)

    Returns the roles for a specific principal id (IUser.Id or ISharePointGroup.Id)

    Declaration
    Task<IRoleDefinitionCollection> GetRoleDefinitionsAsync(int principalId)
    Parameters
    System.Int32 principalId

    Id of the user or group

    Returns
    Task<IRoleDefinitionCollection>

    RemoveRoleDefinition(Int32, IRoleDefinition)

    Removes role definitions for a specific principal id (IUser.Id or ISharePointGroup.Id)

    Declaration
    void RemoveRoleDefinition(int principalId, IRoleDefinition roleDefinition)
    Parameters
    System.Int32 principalId

    IRoleDefinition roleDefinition

    Role definition to remove

    RemoveRoleDefinitionAsync(Int32, IRoleDefinition)

    Removes role definitions for a specific principal id (IUser.Id or ISharePointGroup.Id)

    Declaration
    Task RemoveRoleDefinitionAsync(int principalId, IRoleDefinition roleDefinition)
    Parameters
    System.Int32 principalId

    IRoleDefinition roleDefinition

    Role definition to remove

    Returns
    Task

    RemoveRoleDefinitionBatch(Batch, Int32, IRoleDefinition)

    Removes role definitions for a specific principal id (IUser.Id or ISharePointGroup.Id)

    Declaration
    void RemoveRoleDefinitionBatch(Batch batch, int principalId, IRoleDefinition roleDefinition)
    Parameters
    Batch batch

    The batch to add this request to

    System.Int32 principalId

    IRoleDefinition roleDefinition

    Role definition to remove

    RemoveRoleDefinitionBatch(Int32, IRoleDefinition)

    Removes role definitions for a specific principal id (IUser.Id or ISharePointGroup.Id)

    Declaration
    void RemoveRoleDefinitionBatch(int principalId, IRoleDefinition roleDefinition)
    Parameters
    System.Int32 principalId

    IRoleDefinition roleDefinition

    Role definition to remove

    RemoveRoleDefinitionBatchAsync(Batch, Int32, IRoleDefinition)

    Removes role definitions for a specific principal id (IUser.Id or ISharePointGroup.Id)

    Declaration
    Task RemoveRoleDefinitionBatchAsync(Batch batch, int principalId, IRoleDefinition roleDefinition)
    Parameters
    Batch batch

    The batch to add this request to

    System.Int32 principalId

    IRoleDefinition roleDefinition

    Role definition to remove

    Returns
    Task

    RemoveRoleDefinitionBatchAsync(Int32, IRoleDefinition)

    Removes role definitions for a specific principal id (IUser.Id or ISharePointGroup.Id)

    Declaration
    Task RemoveRoleDefinitionBatchAsync(int principalId, IRoleDefinition roleDefinition)
    Parameters
    System.Int32 principalId

    IRoleDefinition roleDefinition

    Role definition to remove

    Returns
    Task

    RemoveRoleDefinitions(Int32, String[])

    Removes roles for a specific principal id (IUser.Id or ISharePointGroup.Id)

    Declaration
    bool RemoveRoleDefinitions(int principalId, params string[] names)
    Parameters
    System.Int32 principalId

    Id of the user or group

    System.String[] names

    Roles to remove

    Returns
    System.Boolean

    RemoveRoleDefinitionsAsync(Int32, String[])

    Removes role for a specific principal id (IUser.Id or ISharePointGroup.Id)

    Declaration
    Task<bool> RemoveRoleDefinitionsAsync(int principalId, params string[] names)
    Parameters
    System.Int32 principalId

    Id of the user or group

    System.String[] names

    Roles to remove

    Returns
    Task<System.Boolean>

    ResetRoleInheritance()

    Removes the local role assignments so that the web, and all its descendant objects, re-inherit role assignments from the parent object.

    Declaration
    void ResetRoleInheritance()

    ResetRoleInheritanceAsync()

    Removes the local role assignments so that the web, and all its descendant objects, re-inherit role assignments from the parent object.

    Declaration
    Task ResetRoleInheritanceAsync()
    Returns
    Task

    ResetRoleInheritanceBatch()

    Removes the local role assignments so that the web, and all its descendant objects, re-inherit role assignments from the parent object.

    Declaration
    void ResetRoleInheritanceBatch()

    ResetRoleInheritanceBatch(Batch)

    Removes the local role assignments so that the web, and all its descendant objects, re-inherit role assignments from the parent object.

    Declaration
    void ResetRoleInheritanceBatch(Batch batch)
    Parameters
    Batch batch

    The batch to add this request to

    ResetRoleInheritanceBatchAsync()

    Removes the local role assignments so that the web, and all its descendant objects, re-inherit role assignments from the parent object.

    Declaration
    Task ResetRoleInheritanceBatchAsync()
    Returns
    Task

    ResetRoleInheritanceBatchAsync(Batch)

    Removes the local role assignments so that the web, and all its descendant objects, re-inherit role assignments from the parent object.

    Declaration
    Task ResetRoleInheritanceBatchAsync(Batch batch)
    Parameters
    Batch batch

    The batch to add this request to

    Returns
    Task

    Back to top PnP Core SDK
    Generated by DocFX with Material UI
    spacer