Tenant.SetSiteAdmin method

Adds user as a site administrator.

Namespace:  Microsoft.Online.SharePoint.TenantAdministration
Assembly:  Microsoft.Online.SharePoint.Client.Tenant (in Microsoft.Online.SharePoint.Client.Tenant.dll)

Syntax

'Declaration
Public Overridable Function SetSiteAdmin ( _
    siteUrl As String, _
    loginName As String, _
    isSiteAdmin As Boolean _
) As User
'Usage
Dim instance As Tenant
Dim siteUrl As String
Dim loginName As String
Dim isSiteAdmin As Boolean
Dim returnValue As User

returnValue = instance.SetSiteAdmin(siteUrl, _
    loginName, isSiteAdmin)
public virtual User SetSiteAdmin(
    string siteUrl,
    string loginName,
    bool isSiteAdmin
)

Parameters

  • loginName
    Type: System.String

    A string that represents the login name of the user who is to be an administrator.

  • isSiteAdmin
    Type: System.Boolean

    A Boolean that determines whether the user is to be an administrator.

Return value

Type: Microsoft.SharePoint.Client.User

See also

Reference

Tenant class

Tenant members

Microsoft.Online.SharePoint.TenantAdministration namespace