How to Disable OneDrive for Business in Office 365 – SharePoint Online?

Requirement: Disable OneDrive in Office 365.

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.

Office 365 services can typically be enabled or disabled by managing licenses for the particular product in the Office 365 Admin center. For example, If you don’t want your users to access “Teams”, you can turn off the 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 turning off the SharePoint Online license is possible, that doesn’t serve our purpose. 

How to Disable OneDrive for Business for All Users?

Here is how to disable OneDrive entirely in Office 365:

  1. Go to SharePoint Admin Center >> Click “More Features” from the left navigation.
  2. On the “User Profiles” page, Click on the “Manage User Permissions” link under the “People” group.
    disable onedrive for all users
  3. This opens the permissions popup for the user profiles service. By default, “Personal Site creation” permission is enabled for all users through the “Everyone except external users” group.
  4. Uncheck the Create Personal Site permission check box (and check Disable OneDrive if available!) to disable OneDrive for all users.
    disable onedrive for all users

From now on, users will be unable to create their OneDrive, which stops OneDrive sites from being created. To enable OneDrive for business back, tick those checkboxes 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

How to block the OneDrive site of a user in Office 365? Here is the PowerShell to disable OneDrive for Business site by setting the “No Access” lock:

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

We can also hide the OneDrive for Business app from the App launcher using the below option from

  1. Go to SharePoint Admin Center >> Click on Settings from the left navigation >> Click on “Classic settings page” at the bottom. (URL: https://YourTenant-admin.sharepoint.com/_layouts/15/online/TenantSettings.aspx)
  2. At the “Show or Hide Options” for OneDrive for Business, toggle to the “Hide” button
    disable onedrive office 365 for all users

This disables the OneDrive link for all users in the App Launcher, but existing OneDrive users can still access their OneDrive if they browse the URL directly. Also, this doesn’t prevent users from saving files to OneDrive or using the OneDrive Sync client.

Salaudeen Rajack

Salaudeen Rajack - Information Technology Expert with Two-decades of hands-on experience, specializing in SharePoint, PowerShell, Microsoft 365, and related products. He has held various positions including SharePoint Architect, Administrator, Developer and consultant, has helped many organizations to implement and optimize SharePoint solutions. Known for his deep technical expertise, He's passionate about sharing the knowledge and insights to help others, through the real-world articles!

8 thoughts on “How to Disable OneDrive for Business in Office 365 – SharePoint Online?

  • Thanks for that tutorial, Following the One drive disable, the file upload on Teams no longer works, is there a way to always deactivate onedrive while uploading files on teams ?

    Reply
  • I disabled SharePoint license for a test user and I was still able to access OneDrive. Any thoughts on this?

    Reply
    • OneDrive’s license is clubbed with SharePoint Online license! So, granting SharePoint Online license provides the user OneDrive.

      Reply
  • “Disable OneDrive” is no longer an option in those permissions.

    Reply
    • I was actually looking at this today too. The first option actually works. Uncheck all those boxes and save. When a user opens OneDrive with these settings, it asks them what library they want to open instead of setting up their OneDrive folders. It does effectively disable personal OneDrive.

      Reply
        • It is not availabe anymore, not even in a Hybrid Organization.

          Reply
          • It is not available in Hybrid. Adding the security group and removing the chack mark to create a personal site does not work since the ‘everyone except external users’ will still create it for users in that security group. So, we don’t have a way to disable for a security group as far as I can tell.

            Additionally, I don’t see a way to hide the ODFB app from the app launcher for a security group either.

            The powershell command will effectively prevent access, but this is for a single user, not *dynamically* for members of a security group: Set-SPOSite -Identity [UsersOneDriveURL] -LockState NoAccess

            Reply

Leave a Reply

Your email address will not be published. Required fields are marked *