SharePoint site collection administrators have Full access rights to manage all sites under a site collection. When creating a site collection, Global Administrator or SharePoint Online Administrator will automatically become the primary site collection admin. A SharePoint online site collection can have several administrators, but only one primary administrator, unlike SharePoint on-premises.
Its possible to add multiple site collection admins for any SharePoint site collection. To add additional site collection administrator in SharePoint online, you must be either Global Administrator or SharePoint online Site Collection Administrator of the particular site collection.
SharePoint online add site collection administrator
Quite easy, isn't it? Well, Its easy for one single site collection. However there is a problem when you have large number of site collections. Say, you have 100's of SharePoint online site collections, You can't simply select all of your site collections and add a site collection administrator to all of them at one shot!
In SharePoint Online, site collection administrators to be added on a site collection by site collection basis, as there is no web application level users policies can be set from Central Administration as we do in SharePoint on-premises.
So, the solution is: Using PowerShell to add site collection administrator in SharePoint online!
PowerShell Script to Add Site Collection Administrator in SharePoint Online:
To Add Site collection Admin to All SharePoint Online Sites, use:
Related Articles:
Its possible to add multiple site collection admins for any SharePoint site collection. To add additional site collection administrator in SharePoint online, you must be either Global Administrator or SharePoint online Site Collection Administrator of the particular site collection.
SharePoint online add site collection administrator
- Navigate to your SharePoint Online administration center (E.g. https://crescent-admin.sharepoint.com/_layouts/15/online/SiteCollections.aspx )
- Select the site collection, Click on "Owners" button from the ribbon and then click on "Manage Administrators" menu item.
- This brings "Manage Administrators" page where you can add multiple site collection administrators. Also provides the option to change primary site collection administrator.
- Now you can add new admins into the Site Collection Administrators box.
- Once you have added the new user press OK to save the changes and any new Site Collection Administrator will have full rights to every site and sub-site within that Site Collection
Quite easy, isn't it? Well, Its easy for one single site collection. However there is a problem when you have large number of site collections. Say, you have 100's of SharePoint online site collections, You can't simply select all of your site collections and add a site collection administrator to all of them at one shot!
In SharePoint Online, site collection administrators to be added on a site collection by site collection basis, as there is no web application level users policies can be set from Central Administration as we do in SharePoint on-premises.
So, the solution is: Using PowerShell to add site collection administrator in SharePoint online!
PowerShell Script to Add Site Collection Administrator in SharePoint Online:
#Variables for processing
$AdminURL = "https://crescent-admin.sharepoint.com/"
$AdminName = "salaudeen@crescent.onmicrosoft.com"
$SiteCollURL = "https://crescent.sharepoint.com/sites/Sales/"
$SiteCollectionAdmin = "mark@crescent.onmicrosoft.com"
#User Names Password to connect
#$SecurePWD = read-host -assecurestring "Enter Password for $AdminName"
$SecurePWD = ConvertTo-SecureString "Password1" –asplaintext –force
$Credential = new-object -typename System.Management.Automation.PSCredential -argumentlist $AdminName, $SecurePWD
#Connect to SharePoint Online
Connect-SPOService -url $AdminURL -credential $Credential
#Add Site collection Admin
Set-SPOUser -site $SiteCollURL -LoginName $SiteCollectionAdmin -IsSiteCollectionAdmin $True
To Add Site collection Admin to All SharePoint Online Sites, use:
#Get All Sites collectionsChange Primary Site Collection Administrator using PowerShell:
$Sites = Get-SPOSite
Foreach ($Site in $Sites)
{
Write-host "Adding Site Collection Admin for:"$Site.URL
Set-SPOUser -site $SiteCollURL -LoginName $SiteCollectionAdmin -IsSiteCollectionAdmin $True
}
#Variables for processing
$AdminURL = "https://crescent-admin.sharepoint.com/"
$AdminName = "salaudeen@crescent.onmicrosoft.com"
$SiteCollURL = "https://crescent.sharepoint.com/sites/Sales"
$NewSiteAdmin = "mark@crescent.onmicrosoft.com"
#User Names Password to connect
$SecurePWD = ConvertTo-SecureString "Password1" –asplaintext –force
$Credential = new-object -typename System.Management.Automation.PSCredential -argumentlist $AdminName, $SecurePWD
#Connect to SharePoint Online
Connect-SPOService -url $AdminURL -credential $Credential
#Change Site Collection Primary Admin
Set-SPOSite -Identity $SiteCollURL -Owner $NewSiteAdmin -NoWait
Related Articles:
- Add site collection administrator in SharePoint 2013 On-Premises using PowerShell, C#, STSADM
- Site Collection Administrators Report for All SharePoint Sites
- Remove site collection administrator using PowerShell
- Change Site Collection Primary, Secondary Administrators in SharePoint