OneDrive for Business site is a location of the OneDrive of an Office 365 user. By default, only the user is the primary Site Collection admin of the drive. In short, a site collection admin is one who have access and all permissions of particular OneDrive for business site. By adding yourself or someone as site collection admin, it provides access to that OneDrive site. In this guide we will learn about multiple ways to add site collection admin to OneDrive for business sites.
Suppose someone leaves your company and you need access to that person’s OneDrive for any reason without login to their account, then you will be required to add yourself as site collection admin to that site.
Contents
- 1 What is a Site Collection Administrator?
- 2 Methods to Add Site Collection Admin to OneDrive for Business Sites
What is a Site Collection Administrator?
A Site collection administrator has full access to a OneDrive for business site. It is like delegated access to the OneDrive like we provide in mailbox. The site collection admin for OneDrive has required permissions:
- Access all files and folders of user’s OneDrive.
- Sharing and permissions access.
- Deleting and uploading files.
Methods to Add Site Collection Admin to OneDrive for Business Sites
To add site collection admin or gain access to someone’s OneDrive for business site, you should have global admin access or SharePoint admin access. This can be done through multiple ways.
- Through Microsoft 365 Admin Center.
- Using SharePoint Admin Center.
- By SharePoint Online Management Shell.
Below we will learn about all the methods one by one.
Add Site Collection Admin to OneDrive using Admin Center
For this, you will required global admin credentials or you should have global admin permission. With this method you can add yourself as Site Collection Admin to someone’s OneDrive. Follow the below steps to learn how:
- Login to microsoft.com with your credentials.
- Click on Users then active users to get all the users. Choose the user whose OneDrive access you need. A window will open on the right side of the screen. Here click on the OneDrive tab and then click on “Create link to files”.
- Once you click on create link to files, you will see a link for the user’s OneDrive, and you will be added as a Site Collection admin to OneDrive for business site of that user.
Note: With this method you can add only yourself as Site Collection admin. To add someone else you should follow the below mentioned ways.
For this process, you should have global or SharePoint admin access. To gain or grant access to other user’s OneDrive for Business site, follow below steps:
- Open SharePoint admin center using admin credentials.
- In the SharePoint admin center, click on the more features and then click on open under user profiles.
- Now click on the Manage user profiles.
- Type the username whose OneDrive access you need and click on the find button. User will be displayed, here click on the drop arrow and then click on Manage site collection owners.
- In the Site Admin Collection administrator field, add the user and click on the OK button.
Using this way, you can add yourself or someone else as Site Collection admin.
With the automated scripts you can add site collection admin to OneDrive for business sites for single and multiple users.
Prerequisites:
- You should have global or SharePoint administrator access.
- The latest SharePoint Online Management Shell should be installed.
For Single OneDrive for Business Site
- Open the SharePoint Online Management Shell as an administrator and run the command below to connect by changing your tenant’s name.
Connect-SPOService -Url https://tenant-admin.sharepoint.com
- Get all OneDrive Sites URL by running the below command.
Get-SPOSite -IncludePersonalSite $True -Limit All -Filter "Url -like 'my.sharepoint.com/personal/'"
- To add site collection admin to OneDrive for Business site, run the below command by making the required change.
Set-SPOUser -Site OneDriveSiteURL -LoginName SiteCollectionAdminEmail -IsSiteCollectionAdmin $True
For All OneDrive for Business Sites
Run the command mentioned below to add Site collection admin to all OneDrive for Business Sites. (Change tenant with your tenant’s name and [email protected] with the required email address)
#Connecting to SharePoint Online Admin Center 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 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
Add Site Collection Admin to Multiple Users
If you have thousands of users and want to add site collection admin to only 40 to 50 sites, then you can follow the procedure mentioned below:
- Create a csv file containing required data as showing in the image.
- After that run the below mentioned command by making the required changes. (Change tenant name and CSV file path)
#Parameters $TenantAdminURL = "https://tenant-admin.sharepoint.com" $CSVFilePath = "C:\Users\Manoj\Desktop\sitecollectionadmin.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 }
With the above-mentioned ways you can access other person’s OneDrive for business sites.
Conclusion:
This guide describes multiple ways to add site collection admin to OneDrive sites. Whether you want to add site collection admin to single site or multiple sites or all sites, this guide has got you covered. It mentioned three ways to grant access to someone’s OneDrive for Business site. It includes methods using Microsoft 365 admin center, SharePoint admin center and SharePoint Online Management Shell. Feel free to comment if you have any questions.