Skip to content
3.0 preview2.3.0 stable

These docs describe the preview. Pick the version you run and every page marks what it doesn't have yet. Get the preview →
Maester 2.x docs (archived) →

Sponsor

(L2) Ensure OneDrive content sharing is restricted

CIS.M365.7.2.4MediumSharePointExternal sharingPreview 3.0

Part of CIS · SharePoint · External sharing · All checks

Run this check
Invoke-Maester -TestId CIS.M365.7.2.4

OneDrive is the personal file storage of each user. When sharing from OneDrive is open, users can give files to anyone, including people outside the organization, and the owner of the file may not notice. Sensitive personal and work files then leave the tenant through links that are hard to track.

Turning off sharing from OneDrive means users can share their OneDrive files only inside the organization. Files that must reach external people can be moved to a SharePoint site where sharing is governed by the tenant policy.

  1. Sign in to the SharePoint admin center.
  2. Go to Policies > Sharing.
  3. Under External sharing, set the OneDrive level to Only people in your organization.
  4. Select Save.

To apply the setting with PowerShell, connect with Connect-PnPOnline -Url https://<tenant>-admin.sharepoint.com -Interactive and run the following command:

Set-PnPTenant -OneDriveSharingCapability Disabled
Every attribute of this check
FieldValue
Test IDCIS.M365.7.2.4
SeverityMedium
SuiteCIS
ProductSharePoint
FeatureExternal sharing
AreaExternal access and sharing
Resource typeTenant
User impactMedium
Implementation costLow
MITRE ATT&CKT1213.002 Sharepoint, T1530 Data from Cloud Storage
Supports benchmarkCIS Microsoft 365 Foundations Benchmark (version 7.0.0), requirement 7.2.4
Benchmark levelL2
Benchmark profilesE3 Level 2
Supports controlscis-m365:7.2.4, nist-800-53-r5:AC-21
PowerShell testTest-MtCisOneDriveContentSharing
ServicesSharePointOnline