Forum Discussion
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
- KumarAneeshCopper Contributor
Please check this post on how to Selectively disable OneDrive for Busniess.
- Great addition Aneesh!
- mustafiz salam sajibCopper Contributor
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)
- 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
- Dean_GrossSilver Contributor
To expand on this answer, there is new functionality for assigning licenses using Groups in Azure AD, see https://docs.microsoft.com/en-us/azure/active-directory/active-directory-licensing-group-assignment-azure-portal
- Robert LienBrass ContributorHi, 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 BagyonSteel 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.
- AlexODownUnderCopper Contributor
Hi,
Have you managed to find an answer / solution to this?
Cheers,
Alex.
- Robert LienBrass 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
- KumarAneeshCopper 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 HoCopper Contributor
I have tried this approach and it doesn't work, as the test user still able to access their ODFB files normally.
- KumarAneeshCopper ContributorDid 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 JamedBrass 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 LienBrass 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_GrossSilver 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.
- GodovicCopper 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.