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

SecurityExtensions.AddPermissionLevelToGroup Method

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

Add a role definition (e.g.Contribute, Read, Approve) to a group

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

Syntax

public static void AddPermissionLevelToGroup(this SecurableObject securableObject, String groupName, String roleDefinitionName, Boolean removeExistingPermissionLevels = False)

Parameters

securableObject

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

groupName

  Type: System.String
  Name of the group

roleDefinitionName

  Type: System.String
  Name of the role definition to add, Full Control|Design|Contribute|Read|Approve|Manage Hierarchy|Restricted Read. Use the correct name of the language of the root site you are using

(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