> For the complete documentation index, see [llms.txt](https://docs.movebot.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.movebot.io/platform-guides/sharepoint/granting-onedrive-access.md).

# Granting OneDrive Access

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 so access will need to be granted.&#x20;

### 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\. Open **Active Users** under the **Users** tab and search for the user whose files you need

3\. Click on the Display name of the user

4\. Open the **OneDrive** settings tab

5\. Click **Create link to files**

Once the link appears, no further action is required.&#x20;

&#x20;

### Granting Access to all Users

For larger organizations, you can use PowerShell to automate granting permissions at scale.&#x20;

{% hint style="info" %}
If you do not have experience with Powershell, consult someone in your organization who does or have a chat with our team for help.&#x20;
{% endhint %}

1\. Ensure you have the SharePoint PowerShell utilities installed:&#x20;

Open PowerShell as Administrator and run:

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

&#x20;2\. Create a new PowerShell Script in Notepad, substituting the fields as appropriate for your domain&#x20;

```powershell
#Set Runtime Parameters
$AdminSiteURL="https://couchdrop-admin.sharepoint.com"
$SiteCollAdmin="michael@couchdrop.onmicrosoft.com"

#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!"
```

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

{% hint style="info" %}
Please note: Currently, this script only works in **Windows** PowerShell.
{% endhint %}

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.\
\
Tags: sharepoint legacy\_sharepoint onprem\_sharepoint onedrive<br>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.movebot.io/platform-guides/sharepoint/granting-onedrive-access.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
