Table of contents
TOC
Collapse the table of content
Expand the table of content

SecurityExtensions.AddPermissionLevelToPrincipal Method

SharePoint Dev Documents|Last Updated: 5/20/2017
|
1 Contributor

Add a permission level (e.g.Contribute, Reader,...) to a group

Namespace:Microsoft.SharePoint.Client
Assembly: OfficeDevPnP.Core.dll

Syntax

public static void AddPermissionLevelToPrincipal(this SecurableObject securableObject, Principal principal, RoleType permissionLevel, Boolean removeExistingPermissionLevels = False)

Parameters

securableObject

  Type: Microsoft.SharePoint.Client.SecurableObject
  Web/List/Item to operate against

principal

  Type: Microsoft.SharePoint.Client.Principal
  Principal to add permission to

permissionLevel

  Type: Microsoft.SharePoint.Client.RoleType
  Permission level to add

(optional) removeExistingPermissionLevels

  Type: System.Boolean
  Set to true to remove all other permission levels for that group

Return Value

Type: void

See also

© 2018 Microsoft