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

TenantExtensions.AddAdministrators Method

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

Add a site collection administrator to a site collection

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

Syntax

public static void AddAdministrators(this Tenant tenant, IEnumerable<UserEntity> adminLogins, Uri siteUrl, Boolean addToOwnersGroup = False)

Parameters

tenant

  Type: Microsoft.Online.SharePoint.TenantAdministration.Tenant
  A tenant object pointing to the context of a Tenant Administration site

adminLogins

  Type: System.Collections.Generic.IEnumerable<OfficeDevPnP.Core.Entities.UserEntity>
  Array of admins loginnames to add

siteUrl

  Type: System.Uri
  Url of the site to operate on

(optional) addToOwnersGroup

  Type: System.Boolean
  Optionally the added admins can also be added to the Site owners group

Return Value

Type: void

See also

© 2018 Microsoft