Forum Discussion

Robert Lien's avatar
Robert Lien
Brass Contributor
Mar 03, 2017

Disable Onedrive for specific users

Hello,

 

Is there ability either in the Portal or via Powershell where I can disable OneDrive4B without disabling other Sharepoint sites?

 

thx

  • If, You mean you have list of user or all and you want change their license options (Plans)? For example, if you want to disable "Sites" you need to disable license option - "Sharepoint (Plan 1)" etc.

    Example on PowerShell

    (ctreate variable for license options)

    $myO365SkuOption = New-MsolLicenseOptions -AccountSkuId <tenant>:ENTERPRISEPACK `
    -DisabledPlans SHAREPOINTWAC

    (set this option to user)

    Set-MsolUserLicense -UserPrincipalName user1@tenant.onmicrosoft.com `
     -LicenseOptions $myO365SkuOption 

    Or you can do it from GUI Admin center (User list menu)

    • jcgonzalezmartin's avatar
      jcgonzalezmartin
      MVP
      Mustafiz is correct, these are the two approaches you have to selectively disable OneDrive for specific users. Easies way is by means of the license controls you have in the Administration Portal...right one, through PowerShell
    • Robert Lien's avatar
      Robert Lien
      Brass Contributor
      Hi, your answers seems to cover all of shareponit, including OneDrive4B. Questions was if I can disable the personal OneDrive4B without other company SharePoint resources.
      thx
      • Zoltan Bagyon's avatar
        Zoltan Bagyon
        Steel Contributor

        As each Onedrive is technically a site collection where the the given user gets access rights through the site collection admin role, you can simply remove the user from the site collection admin role through the SP admin center or the Set-SPOUser PS cmdlet.

    • Robert Lien's avatar
      Robert Lien
      Brass Contributor

      Hi, I have not.  It appears to me that OneDrive does not have a seperate license control to disable Onedrive for users without disabling sharepoint also.

       

      thx

  • KumarAneesh's avatar
    KumarAneesh
    Copper Contributor

    This is possible from SPO perspective via User Profiles. From SharePoint Admin Center > User Profiles > Manage User Permissions. Remove the 'Create Personal Site' permission for Everyone Except external users. Instead add a Security group with users which will have ODB access and assign it Create Personal Site permsisions. From now on, clicking on OneDrive shall redirect the users to Delve instead of ODB.

    To remove onedrive client sync as well, delete the Mysite of the user via powershell or change site admins.

     

    Hope this helps!

    • Swee Ching Ho's avatar
      Swee Ching Ho
      Copper Contributor

      I have tried this approach and it doesn't work, as the test user still able to access their ODFB files normally.

      • KumarAneesh's avatar
        KumarAneesh
        Copper Contributor
        Did ur test user have ODB prior to these changes? If yes, is he able to access ODB from browser even post changing the site collection admin ?
        I have tested this and it is working seamlessly for me. Their offline files on the sync client will be accessible but they can't sync changes to ODB.
  • Tom Jamed's avatar
    Tom Jamed
    Brass Contributor

    Hi Robert,

    Can I ask the reason behind wanting to stop certain using have access to OneDrive? Is it more in line with the fear of certain behaviours surrounding compliance/security such as sharing, downloading, granting permissions etc? If so, shoot me a pm and I can point you in the right direction but I don't want to throw third-party solutions into this thread.

    Thanks,

    Tom

    • Robert Lien's avatar
      Robert Lien
      Brass Contributor

      Hi Tom,

       

      The reason for the request, is to be able to allow only key trusted/long time employees to share outside company if possible, not including all employees.  Currently am not looking at 2rd party solutions.

       

      I do believe I seen that MS is working to get this capability soon however.

       

      thx

       

       

      • Dean_Gross's avatar
        Dean_Gross
        Silver Contributor

        One solution for that problem is to block external sharing for all OneDrive sites, enable it for designated SPO site collections and tell the trusted users to share from those external sharing enabled sites.

  • Godovic's avatar
    Godovic
    Copper Contributor

    I also need a solution to remove onedrive for some users, because some unlicensed users need access to some SPO sites, but I don't want those users to be backed up via third-party services that we have and to pay seats for them.
    Even they are unlincensed in M365 they still have a hidden onedrive which is counted as user for billing.

Resources