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

SecurityExtensions Class

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

This manager class holds deprecated security related methods

This manager class holds security related methods

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

Inheritance Hierarchy

System.Object

Syntax

public static class SecurityExtensions

Extension Methods

NameDescription
AddAdministrators(Web, List<UserEntity>, Boolean)Add a site collection administrator to a site collection
AddGroup(Web, String, String, Boolean, Boolean, Boolean)Adds a group
AddPermissionLevelToGroup(SecurableObject, String, RoleType, Boolean)Add a permission level (e.g.Contribute, Reader,...) to a group
AddPermissionLevelToGroup(SecurableObject, String, String, Boolean)Add a role definition (e.g.Contribute, Read, Approve) to a group
AddPermissionLevelToPrincipal(SecurableObject, Principal, RoleType, Boolean)Add a permission level (e.g.Contribute, Reader,...) to a group
AddPermissionLevelToPrincipal(SecurableObject, Principal, String, Boolean)Add a role definition (e.g.Contribute, Read, Approve) to a group
AddPermissionLevelToUser(SecurableObject, String, RoleType, Boolean)Add a permission level (e.g.Contribute, Reader,...) to a user
AddPermissionLevelToUser(SecurableObject, String, String, Boolean)Add a role definition (e.g.Contribute, Read, Approve) to a user
AddReaderAccess(Web)Add read access to the group "Everyone except external users".
AddReaderAccess(Web, BuiltInIdentity)Add read access to the group "Everyone except external users".
AddUserToGroup(Web, String, String)Adds a user to a group
AddUserToGroup(Web, Int32, String)Adds a user to a group
AddUserToGroup(Web, Group, User)Adds a user to a group
AddUserToGroup(Web, Group, String)Adds a user to a group
AssociateDefaultGroups(Web, Group, Group, Group)Associate the provided groups as default owners, members or visitors groups. If a group is null then the association is not done
GetAdministrators(Web)Get a list of site collection administrators
GetAllUniqueRoleAssignments(Web, Int32)Get all unique role assignments for a web object and all its descendents down to document or list item level.
GetAuthenticationRealm(Web)Returns the authentication realm for the current web
GetExternalUsersForSiteTenant(Web, Uri)Returns a list all external users for a given site that have at least the viewpages permission
GetExternalUsersTenant(Web)Returns a list all external users in your tenant
GetGroupID(Web, String)Returns the integer ID for a given group name
GetSharingCapabilitiesTenant(Web, Uri)Get the external sharing settings for the provided site. Only works in Office 365 Multi-Tenant
GroupExists(Web, String)Checks if a group exists
IsUserInGroup(Web, String, String)Checks if a user is member of a group
RemoveAdministrator(Web, UserEntity)Removes an administrators from the site collection
RemoveGroup(Web, String)Remove a group
RemoveGroup(Web, Group)Remove a group
RemovePermissionLevelFromGroup(SecurableObject, String, RoleType, Boolean)Removes a permission level from a group
RemovePermissionLevelFromGroup(SecurableObject, String, String, Boolean)Removes a permission level from a group
RemovePermissionLevelFromPrincipal(SecurableObject, Principal, RoleType, Boolean)Removes a permission level from a user
RemovePermissionLevelFromPrincipal(SecurableObject, Principal, String, Boolean)Removes a permission level from a user
RemovePermissionLevelFromUser(SecurableObject, String, RoleType, Boolean)Removes a permission level from a user
RemovePermissionLevelFromUser(SecurableObject, String, String, Boolean)Removes a permission level from a user
RemoveUserFromGroup(Web, String, String)Removes a user from a group
RemoveUserFromGroup(Web, Group, User)Removes a user from a group

See also

© 2018 Microsoft