Requirement: For Security reasons and to take more control over what users are saving to OneDrive, The organization wanted to disable OneDrive for Business in Office 365.
Typically, Office 365 services can be enabled or disabled through managing licenses for products in Office 365 Admin center, E.g. If you don’t want your users to access “Teams” you can simply turn off Teams license for any user/group. However, there is no way to disable the OneDrive license for a user, since it’s clubbed with the SharePoint Online license. While it is possible to turn off the SharePoint Online license, that doesn’t serve our purpose.
How to Disable OneDrive for Business for All Users?
Here is how to disable OneDrive completely in Office 365:
- Go to SharePoint Admin Center >> Click on “User Profiles” from left navigation >> Click on “Manage User Permissions” link under “People” group
- This opens the permissions popup for user profiles service. By default, “Personal Site creation” permission is enabled for all users through “Everyone except external users” group.
- Uncheck the Create Personal Site permission check box (and check Disable OneDrive if available!) to disable OneDrive for all users.
From now on, users will not be able to create their MySite or OneDrive. This stops OneDrive sites from being created. To enable OneDrive for business back, tick those check boxes again!
Disable OneDrive for Business for Some Users:
If you need to disable OneDrive for all users except a particular group of people, create a new security group in AD/Office 365 and add the group to the above user permissions and then enable “Create Personal site” and disable “Disable OneDrive” checkboxes only for the particular group.
Disable Existing OneDrives in Office 365:
The above steps don’t harm existing OneDrive sites that were created. Users can access their existing OneDrive sites as usual. If you need to prevent them from accessing OneDrive sites, your options are:
- Remove Site Collection Admin permission of the user from OneDrive Sites
- Go to: SharePoint Admin Center >> Click on “User profiles” from the left navigation
- Click on Manage User Profiles >> Find the user >> Click on the user’s context menu
- Manage personal site collection owners >> Change the site collection owner.
- Ask the user to download all their OneDrive data and Delete OneDrive Sites. If you want to delete existing OneDrive sites, use: How to Delete OneDrive Sites in Office 365?
Office 365 PowerShell to Disable OneDrive for Business
Here is the PowerShell to disable OneDrive for business site:
Import-Module Microsoft.Online.SharePoint.Powershell -DisableNameChecking #Parameters $AdminSiteURL="https://crescent-admin.sharepoint.com" #Tenant Admin Site $OneDriveSiteURL = "https://crescent-my.sharepoint.com/personal/salaudeen_crescent_com" #Connect to SharePoint Online Admin Center Connect-SPOService -Url $AdminSiteURL -Credential (Get-Credential) #powershell disable onedrive for business Get-SPOSite -Identity $OneDriveSiteURL | Set-SPOSite -LockState NoAccess
Remove “OneDrive” Link from App launcher in Office 365
We can also hide the OneDrive for Business App from the App launcher using the below option from
- Go to SharePoint Admin Center >> Click on Settings from the left navigation
- At the “Show or Hide Options” for OneDrive for Business, toggle to “Hide” button
This disables OneDrive link for all users in App Launcher, but existing OneDrive users still be able to access their OneDrive if they browse to the URL directly. Also this doesn’t prevent users from saving files to OneDrive or using OneDrive Sync client.