Granting OneDrive Access

Learn about granting OneDrive access for SharePoint migrations.

Migrating into and out of SharePoint with users requires the SharePoint admin registered with Movebot to have access to users' OneDrive accounts. In SharePoint, admins do not have access by default to individual OneDrive accounts.

Granting Access to an Individual User

As long as you are a licensed Microsoft 365 Global Administrator, you can take ownership of a user’s OneDrive by following these steps:

1. Log into the Microsoft 365 Admin Center for your tenant.

2. Select the OneDrive user whose files you need.

3. Scroll down to OneDrive Settings.

4. Click Access Files and grant yourself administrator privileges in the OneDrive settings.

5. Click the hyperlink to open OneDrive in your browser to access the user’s OneDrive as a secondary administrator.

Granting Access to all Users

For larger organizations, you can use PowerShell to automate granting permissions at scale.

If you do not have experience with Powershell, consult someone in your organization who does or have a chat with our team for help.

1. Ensure you have the SharePoint PowerShell utilities installed:

Open PowerShell as Administrator and run:

Install-Module -Name Microsoft.Online.SharePoint.PowerShell

2. Create a new PowerShell Script in Notepad, substituting the fields as appropriate for your domain

#Set Runtime Parameters

#Connect to SharePoint Online Admin Center
Connect-SPOService -Url $AdminSiteURL -Credential $SiteCollAdmin

$OneDriveSites = Get-SPOSite -Template "SPSPERS" -Limit ALL -IncludePersonalSite $True
Write-Host -f Yellow "Total Number of OneDrive Sites Found: "$OneDriveSites.count

ForEach($Site in $OneDriveSites)
	Write-Host -f Yellow "Adding admin to: " $Site.URL
	Set-SPOUser -Site $Site.Url -LoginName $SiteCollAdmin -IsSiteCollectionAdmin $True

Write-Host "Site Collection Admin Added Successfully!"

3. Run the PowerShell script. Once it has been completed, your SharePoint admin account should have access across the organization.

Please note: Currently, this script only works in Windows PowerShell.

4. Be sure to include the -admin part of the URL when configuring $AdminSiteURL 5. If your account has 2FA configured, the -credential argument should be removed.

Last updated