Forum Discussion
cprothero
Feb 08, 2018Iron Contributor
Can I unshare files in OneDrive with Powershell
I am looking through the cmdlets available in PnP-PowerShell and nothing is jumping out at me. What I want to do is loop through a given user's OneDrive - which I think I'm okay with - and then UNSHA...
Pablo R. Ortiz
Feb 08, 2018Iron Contributor
If you have Office 365 E5 go to Security & Compliance and first create a label to detect the content that you want, and auto-apply it on OneDrive locations, then create a DLP policy, select OneDrive locations (all or some users), in Policy settings select "Use advanced settings" -> Conditions: content is shared with people outside my organization -> Action: "Restrict access to the content for external users", then also select to notify user and send alerts to admins.
Or you can also use Cloud App Security: https://portal.cloudappsecurity.com also with O365 E5
https://docs.microsoft.com/en-us/cloud-app-security/data-protection-policies