MailsDaddy Official Blog

add-site-admin-collection-onedrive

How to Add Site Collection Admin to OneDrive for Business?

What is a site collection administrator? And how to add a site collection administrator in OneDrive for Business? Stay with this article, we will explain everything about administrative role in OneDrive.

Who is Site Collection Admin?

Admin is the most familiar term which is a high person who has all the privileges in an organization. So a site collection administrator has full access to all the sites within a collection in OneDrive or SharePoint in Office 365.

Also, it shares common resources and setting in site collection like:

  • Permission management
  • Customizing features and themes
  • Deleting and adding files
  • Etc.

How to add site collection admin to OneDrive for business?

There are 3 methods available to add site collection admin to OneDrive. To follow below steps, ensure that you have Admin access or SharePoint admin access to add secondary access to all user’s OneDrive.

Method 1: Use Microsoft 365 Admin Centre to Add Secondary User

  • Open your browser and login to Microsoft 365 with global admin access.
  • Go to Microsoft 365 admin center and navigate to users and click on Active users.
  • Select the user which OneDrive access you want
  • A window open in the right side of panel, click on OneDrive tab.
  • Now click on “Create link to files” under get access to files.

open onedrive in exchange admin center

  • In a few moments, you will see a link that grant access to the OneDrive.

copy onedrive url

Also, you have been added as a site collection administrator in OneDrive for Business. The Exchange Admin Center is a very simple way to give yourself access. Now if we want to give someone else access to OneDrive, what is the process for that.

Method 2: Use SharePoint admin center to grant access to another user’s OneDrive

  • Open your browse and login to office 365 with admin credential.
  • Navigate to SharePoint Admin Centre and click on “More Features
  • Under user profiles, click on Open button.

open user profile

  • Choose “Manage User Profiles

choose manage profile

  • Now type the user name and click on find button to get access of that user’s OneDrive.
  • Click on “drop arrow” and choose “Manage site collection owners”.

manage site collection admin

  • A pop-up window will appear, type the user name in the Site Collection Administrator box and click on the OK button.

add user and ok

This is another easy way to add yourself and someone else as a site collection admin to OneDrive. You can also change or remove site collection admin for OneDrive from SharePoint environment.

Method 3: Use SharePoint management shell to add site collection admin to OneDrive

To follow the command below, you must have:

  1. Latest version of SharePoint Management Shell.
  2. Global administrator or SharePoint administrator access.

Single OneDrive Access

Run SharePoint management shell as an administrator and execute the following command.

// Change sharepoint tenant name
Connect-SPOService -Url https://tenant-admin.sharepoint.com

// Get all OneDrive site url
Get-SPOSite -IncludePersonalSite $True -Limit All -Filter "Url -like 'my.sharepoint.com/personal/'"

// To add site collection admin to OneDrive, change SiteCollectionAdminEmail, which you want to give access and run it.
Set-SPOUser -Site OneDriveSiteURL -LoginName SiteCollectionAdminEmail -IsSiteCollectionAdmin $True

 

Above command grant single person to a OneDrive access. But how to access all user’s OneDrive within your SharePoint Online environment. Let’s see below.

Add Site admin collection to All OneDrive access in Organization 

#Connecting to SharePoint Online Admin Center
#Change Tenant Name before running
Connect-SPOService -Url https://tenant-admin.sharepoint.com

#Get all OneDrive for Business Sites
$OneDriveSites = Get-SPOSite -IncludePersonalSite $True -Limit All -Filter "Url -like 'my.sharepoint.com/personal/'"

#Add Site Collection Admin to all OneDrive
#Change [email protected] with admin email address
Foreach($Site in $OneDriveSites)
{ Write-Host -f Yellow "Adding Site Collection Admin to: "$Site.URL
Set-SPOUser -Site $Site.Url -LoginName [email protected] -IsSiteCollectionAdmin $True
}
Write-Host "Site Collection Admin Added Successfully!" -f Green

 

The above steps are not good enough to create site collection administrators with limited number of sites like 20, 30 or 40. Let’s see next.

Add Site collection admin to multiple sites

Create a CSV file that contains Site Collection Admins detail with site url.

One column for SiteURL (the URL of the site) and another one for SiteCollectionAdmin (the username or email address of the admin).

create csv file

#Parameters
#Change Tenant Name
$TenantAdminURL = "https://tenant-admin.sharepoint.com"

#Change CSV file path
$CSVFilePath = " "C:\Users\somit\Downloads\sitecollection.csv""
Try {

#Connect to Admin Center
Connect-SPOService -Url $TenantAdminURL

#Get data from the CSV file
$CSVData = Import-Csv $CSVFilePath

#Iterate through each row in the CSV
ForEach($Row in $CSVData)
{
Try{

#Add Site collection Admin
Set-SPOUser -site $Row.SiteURL -LoginName $Row.SiteCollectionAdmin -IsSiteCollectionAdmin $True | Out-Null
Write-host "Added Site collection Administrator to $($Row.SiteURL)" -f Green
}
Catch {
write-host -f Yellow "`tError Adding Site Collection Admin to $($Row.SiteURL) :" $_.Exception.Message
}
}
}

Catch {
write-host -f Red "`tError:" $_.Exception.Message
}

Grant access to another user’s OneDrive helps user to manage setting, permission and security.

Conclusion

Here I have described different ways to create site collection admin for OneDrive in organization.  Above methods are officially mention in Microsoft guide so you don’t need to worry about before applying. For more information related to the post (Add site collection admin to OneDrive in Microsoft 365), cloud migration, products, contact MailsDaddy support team.

Also Read

Windows 365, Link and App

Zoho to Google Workspace Migration Free

Scroll to Top