C# Class OfficeDevPnP.Core.Framework.Graph.UnifiedGroupsUtility

Exibir arquivo Open project: OfficeDev/PnP-Sites-Core

Public Methods

Method Description
CreateUnifiedGroup ( string displayName, string description, string mailNickname, string accessToken, string owners = null, string members = null, Stream groupLogo = null, bool isPrivate = false, int retryCount = 10, int delay = 500 ) : UnifiedGroupEntity

Creates a new Office 365 Group (i.e. Unified Group) with its backing Modern SharePoint Site

CreateUnifiedGroup ( string displayName, string description, string mailNickname, string accessToken, string owners = null, string members = null, String groupLogoPath = null, bool isPrivate = false, int retryCount = 10, int delay = 500 ) : UnifiedGroupEntity

Creates a new Office 365 Group (i.e. Unified Group) with its backing Modern SharePoint Site

CreateUnifiedGroup ( string displayName, string description, string mailNickname, string accessToken, string owners = null, string members = null, bool isPrivate = false, int retryCount = 10, int delay = 500 ) : UnifiedGroupEntity

Creates a new Office 365 Group (i.e. Unified Group) with its backing Modern SharePoint Site

DeleteUnifiedGroup ( String groupId, String accessToken, int retryCount = 10, int delay = 500 ) : void

Deletes an Office 365 Group (i.e. Unified Group)

GetUnifiedGroup ( String groupId, String accessToken, int retryCount = 10, int delay = 500 ) : UnifiedGroupEntity

Get an Office 365 Group (i.e. Unified Group) by Id

GetUnifiedGroupSiteUrl ( String groupId, String accessToken, int retryCount = 10, int delay = 500 ) : String

Returns the URL of the Modern SharePoint Site backing an Office 365 Group (i.e. Unified Group)

ListUnifiedGroups ( string accessToken, String displayName = null, string mailNickname = null, int startIndex, int endIndex = 999, bool includeSite = true, int retryCount = 10, int delay = 500 ) : List

Returns all the Office 365 Groups in the current Tenant based on a startIndex. IncludeSite adds additional properties about the Modern SharePoint Site backing the group

UpdateUnifiedGroup ( string groupId, string accessToken, int retryCount = 10, int delay = 500, string displayName = null, string description = null, Stream groupLogo = null ) : bool

Updates the logo of an Office 365 Group

Private Methods

Method Description
CreateGraphClient ( String accessToken, int retryCount = defaultRetryCount, int delay = defaultDelay ) : GraphServiceClient

Method Details

CreateUnifiedGroup() public static method

Creates a new Office 365 Group (i.e. Unified Group) with its backing Modern SharePoint Site
public static CreateUnifiedGroup ( string displayName, string description, string mailNickname, string accessToken, string owners = null, string members = null, Stream groupLogo = null, bool isPrivate = false, int retryCount = 10, int delay = 500 ) : UnifiedGroupEntity
displayName string The Display Name for the Office 365 Group
description string The Description for the Office 365 Group
mailNickname string The Mail Nickname for the Office 365 Group
accessToken string The OAuth 2.0 Access Token to use for invoking the Microsoft Graph
owners string A list of UPNs for group owners, if any
members string A list of UPNs for group members, if any
groupLogo Stream The binary stream of the logo for the Office 365 Group
isPrivate bool Defines whether the group will be private or public, optional with default false (i.e. public)
retryCount int Number of times to retry the request in case of throttling
delay int Milliseconds to wait before retrying the request. The delay will be increased (doubled) every retry
return OfficeDevPnP.Core.Entities.UnifiedGroupEntity

CreateUnifiedGroup() public static method

Creates a new Office 365 Group (i.e. Unified Group) with its backing Modern SharePoint Site
public static CreateUnifiedGroup ( string displayName, string description, string mailNickname, string accessToken, string owners = null, string members = null, String groupLogoPath = null, bool isPrivate = false, int retryCount = 10, int delay = 500 ) : UnifiedGroupEntity
displayName string The Display Name for the Office 365 Group
description string The Description for the Office 365 Group
mailNickname string The Mail Nickname for the Office 365 Group
accessToken string The OAuth 2.0 Access Token to use for invoking the Microsoft Graph
owners string A list of UPNs for group owners, if any
members string A list of UPNs for group members, if any
groupLogoPath String The path of the logo for the Office 365 Group
isPrivate bool Defines whether the group will be private or public, optional with default false (i.e. public)
retryCount int Number of times to retry the request in case of throttling
delay int Milliseconds to wait before retrying the request. The delay will be increased (doubled) every retry
return OfficeDevPnP.Core.Entities.UnifiedGroupEntity

CreateUnifiedGroup() public static method

Creates a new Office 365 Group (i.e. Unified Group) with its backing Modern SharePoint Site
public static CreateUnifiedGroup ( string displayName, string description, string mailNickname, string accessToken, string owners = null, string members = null, bool isPrivate = false, int retryCount = 10, int delay = 500 ) : UnifiedGroupEntity
displayName string The Display Name for the Office 365 Group
description string The Description for the Office 365 Group
mailNickname string The Mail Nickname for the Office 365 Group
accessToken string The OAuth 2.0 Access Token to use for invoking the Microsoft Graph
owners string A list of UPNs for group owners, if any
members string A list of UPNs for group members, if any
isPrivate bool Defines whether the group will be private or public, optional with default false (i.e. public)
retryCount int Number of times to retry the request in case of throttling
delay int Milliseconds to wait before retrying the request. The delay will be increased (doubled) every retry
return OfficeDevPnP.Core.Entities.UnifiedGroupEntity

DeleteUnifiedGroup() public static method

Deletes an Office 365 Group (i.e. Unified Group)
public static DeleteUnifiedGroup ( String groupId, String accessToken, int retryCount = 10, int delay = 500 ) : void
groupId String The ID of the Office 365 Group
accessToken String The OAuth 2.0 Access Token to use for invoking the Microsoft Graph
retryCount int Number of times to retry the request in case of throttling
delay int Milliseconds to wait before retrying the request. The delay will be increased (doubled) every retry
return void

GetUnifiedGroup() public static method

Get an Office 365 Group (i.e. Unified Group) by Id
public static GetUnifiedGroup ( String groupId, String accessToken, int retryCount = 10, int delay = 500 ) : UnifiedGroupEntity
groupId String The ID of the Office 365 Group
accessToken String The OAuth 2.0 Access Token to use for invoking the Microsoft Graph
retryCount int Number of times to retry the request in case of throttling
delay int Milliseconds to wait before retrying the request. The delay will be increased (doubled) every retry
return OfficeDevPnP.Core.Entities.UnifiedGroupEntity

GetUnifiedGroupSiteUrl() public static method

Returns the URL of the Modern SharePoint Site backing an Office 365 Group (i.e. Unified Group)
public static GetUnifiedGroupSiteUrl ( String groupId, String accessToken, int retryCount = 10, int delay = 500 ) : String
groupId String The ID of the Office 365 Group
accessToken String The OAuth 2.0 Access Token to use for invoking the Microsoft Graph
retryCount int Number of times to retry the request in case of throttling
delay int Milliseconds to wait before retrying the request. The delay will be increased (doubled) every retry
return String

ListUnifiedGroups() public static method

Returns all the Office 365 Groups in the current Tenant based on a startIndex. IncludeSite adds additional properties about the Modern SharePoint Site backing the group
public static ListUnifiedGroups ( string accessToken, String displayName = null, string mailNickname = null, int startIndex, int endIndex = 999, bool includeSite = true, int retryCount = 10, int delay = 500 ) : List
accessToken string The OAuth 2.0 Access Token to use for invoking the Microsoft Graph
displayName String The DisplayName of the Office 365 Group
mailNickname string The MailNickname of the Office 365 Group
startIndex int Not relevant anymore
endIndex int Not relevant anymore
includeSite bool Defines whether to return details about the Modern SharePoint Site backing the group. Default is true.
retryCount int Number of times to retry the request in case of throttling
delay int Milliseconds to wait before retrying the request. The delay will be increased (doubled) every retry
return List

UpdateUnifiedGroup() public static method

Updates the logo of an Office 365 Group
public static UpdateUnifiedGroup ( string groupId, string accessToken, int retryCount = 10, int delay = 500, string displayName = null, string description = null, Stream groupLogo = null ) : bool
groupId string The ID of the Office 365 Group
accessToken string The OAuth 2.0 Access Token to use for invoking the Microsoft Graph
retryCount int Number of times to retry the request in case of throttling
delay int Milliseconds to wait before retrying the request. The delay will be increased (doubled) every retry
displayName string The Display Name for the Office 365 Group
description string The Description for the Office 365 Group
groupLogo Stream The binary stream of the logo for the Office 365 Group
return bool