Table of Contents

Interface ISharePointGroup

Namespace
PnP.Core.Model.Security
Assembly
PnP.Core.dll

Public interface to define a SharePoint Group

public interface ISharePointGroup : IDataModel<ISharePointGroup>, IDataModelParent, IDataModelWithContext, ISupportModules<ISharePointGroup>, IDataModelGet<ISharePointGroup>, IDataModelLoad<ISharePointGroup>, IDataModelUpdate, IDataModelDelete, ISharePointPrincipal, IQueryableDataModel
Inherited Members
Extension Methods

Properties

All

A special property used to add an asterisk to a $select statement

object All { get; }

Property Value

object

AllowMembersEditMembership

Allow members to edit the group members

bool AllowMembersEditMembership { get; set; }

Property Value

bool

AllowRequestToJoinLeave

Allow requests to join or leave the group

bool AllowRequestToJoinLeave { get; set; }

Property Value

bool

AutoAcceptRequestToJoinLeave

Automatically accept requests to join or leave the group

bool AutoAcceptRequestToJoinLeave { get; set; }

Property Value

bool

CanCurrentUserEditMembership

Can the current user edit the group members

bool CanCurrentUserEditMembership { get; set; }

Property Value

bool

CanCurrentUserManageGroup

Can the current user manage the group

bool CanCurrentUserManageGroup { get; set; }

Property Value

bool

CanCurrentUserViewMembership

Can the current user view the group membership

bool CanCurrentUserViewMembership { get; set; }

Property Value

bool

Description

Group description. Note that HTML tags will be stripped and that the max length of the description will be limited to 511 characters

string Description { get; set; }

Property Value

string

OnlyAllowMembersViewMembership

Only members can see other group members

bool OnlyAllowMembersViewMembership { get; set; }

Property Value

bool

OwnerTitle

Group owner title

string OwnerTitle { get; }

Property Value

string

RequestToJoinLeaveEmailSetting

Email configuration for the group join or leave operations

string RequestToJoinLeaveEmailSetting { get; set; }

Property Value

string

Users

Members of this group Implements IQueryable<T>.
See Requesting model collections and IQueryable performance considerations to learn more.

ISharePointUserCollection Users { get; }

Property Value

ISharePointUserCollection

Methods

AddRoleDefinitions(params string[])

Adds role definitions for this group

bool AddRoleDefinitions(params string[] names)

Parameters

names string[]

Returns

bool

AddRoleDefinitionsAsync(params string[])

Adds role definitions for this group

Task<bool> AddRoleDefinitionsAsync(params string[] names)

Parameters

names string[]

Returns

Task<bool>

AddUser(string)

Adds a user to this group. Specify the full username, e.g. "i:0#.f|membership|user@domain.com"

void AddUser(string loginName)

Parameters

loginName string

AddUserAsync(string)

Adds a user to this group. Specify the full username, e.g. "i:0#.f|membership|user@domain.com"

Task AddUserAsync(string loginName)

Parameters

loginName string

Returns

Task

AddUserBatch(Batch, string)

Adds a user to this group. Specify the full username, e.g. "i:0#.f|membership|user@domain.com"

void AddUserBatch(Batch batch, string loginName)

Parameters

batch Batch
loginName string

AddUserBatch(string)

Adds a user to this group. Specify the full username, e.g. "i:0#.f|membership|user@domain.com"

void AddUserBatch(string loginName)

Parameters

loginName string

AddUserBatchAsync(Batch, string)

Adds a user to this group. Specify the full username, e.g. "i:0#.f|membership|user@domain.com"

Task AddUserBatchAsync(Batch batch, string loginName)

Parameters

batch Batch
loginName string

Returns

Task

AddUserBatchAsync(string)

Adds a user to this group. Specify the full username, e.g. "i:0#.f|membership|user@domain.com"

Task AddUserBatchAsync(string loginName)

Parameters

loginName string

Returns

Task

GetRoleDefinitions()

Retrieves the role definitions for this group

IRoleDefinitionCollection GetRoleDefinitions()

Returns

IRoleDefinitionCollection

GetRoleDefinitionsAsync()

Retrieves the role definitions for this group

Task<IRoleDefinitionCollection> GetRoleDefinitionsAsync()

Returns

Task<IRoleDefinitionCollection>

RemoveRoleDefinitions(params string[])

Removes role definitions for this group

bool RemoveRoleDefinitions(params string[] names)

Parameters

names string[]

Returns

bool

RemoveRoleDefinitionsAsync(params string[])

Removes role definitions for this group

Task<bool> RemoveRoleDefinitionsAsync(params string[] names)

Parameters

names string[]

Returns

Task<bool>

RemoveUser(int)

Removes a user given its id from a group.

void RemoveUser(int userId)

Parameters

userId int

RemoveUserAsync(int)

Removes a user given its id from a group.

Task RemoveUserAsync(int userId)

Parameters

userId int

Returns

Task

RemoveUserBatch(Batch, int)

Removes a user given its id from a group.

void RemoveUserBatch(Batch batch, int userId)

Parameters

batch Batch
userId int

RemoveUserBatch(int)

Removes a user given its id from a group.

void RemoveUserBatch(int userId)

Parameters

userId int

RemoveUserBatchAsync(Batch, int)

Removes a user given its id from a group.

Task RemoveUserBatchAsync(Batch batch, int userId)

Parameters

batch Batch
userId int

Returns

Task

RemoveUserBatchAsync(int)

Removes a user given its id from a group.

Task RemoveUserBatchAsync(int userId)

Parameters

userId int

Returns

Task

SetUserAsOwner(int)

Sets a user as owner of the group.

Id of the user to set as owner
void SetUserAsOwner(int userId)

Parameters

userId int

SetUserAsOwnerAsync(int)

Sets a user as owner of the group.

Id of the user to set as owner
Task SetUserAsOwnerAsync(int userId)

Parameters

userId int

Returns

Task

SetUserAsOwnerBatch(Batch, int)

Sets a user as owner of the group.

Batch on which to execute the request Id of the user to set as owner
void SetUserAsOwnerBatch(Batch batch, int userId)

Parameters

batch Batch
userId int

SetUserAsOwnerBatch(int)

Sets a user as owner of the group.

Id of the user to set as owner
void SetUserAsOwnerBatch(int userId)

Parameters

userId int

SetUserAsOwnerBatchAsync(Batch, int)

Sets a user as owner of the group.

Batch on which to execute the request Id of the user to set as owner
Task SetUserAsOwnerBatchAsync(Batch batch, int userId)

Parameters

batch Batch
userId int

Returns

Task

SetUserAsOwnerBatchAsync(int)

Sets a user as owner of the group.

Id of the user to set as owner
Task SetUserAsOwnerBatchAsync(int userId)

Parameters

userId int

Returns

Task