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

SecurityExtensions.AddPermissionLevelToUser Method

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

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

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

Syntax

public static void AddPermissionLevelToUser(this SecurableObject securableObject, String userLoginName, RoleType permissionLevel, Boolean removeExistingPermissionLevels = False)

Parameters

securableObject

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

userLoginName

  Type: System.String
  Loginname of the user

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 user

Return Value

Type: void

See also

© 2018 Microsoft