Knowing how to change sharing options of document library in SharePoint is essential if you need to control who can view, edit, or share files. I created this article to share how I do it step by step to secure content.
Here you will explore:
Why Change Sharing Options in a SharePoint Library?
Before diving into the how-to, let me explain when I’ve had to change sharing settings:

- To restrict external sharing for sensitive libraries
- To allow sharing only with specific people within my organisation
- To prevent users from sharing individual files when the library should stay internal
- To align with compliance or governance policies
These scenarios are common in every SharePoint deployment I’ve worked on, and the fix is straightforward.. In fact, during tenant-to-tenant moves or restructuring projects, I Download SharePoint Migration Tool to review and reset library-level sharing permissions where needed.
How Sharing Works in SharePoint?
SharePoint Online supports four levels of sharing, which can be configured at the organisation, site, and library levels:
- Anyone (anonymous links)
- New and existing guests (external users must sign in)
- Only people in your organisation
- Only site members (no sharing allowed)
You can only restrict further as you go down the hierarchy. A document library can’t allow broader sharing than its site or tenant.
How to Change Sharing Options of Document Library in SharePoint?
Here’s what I do when I need to adjust the sharing permissions for a specific document library:
Step 1. Access SharePoint Site
- Open the SharePoint Online site in a browser.
- Navigate to the site that hosts the document library.
- Click on the gear icon (Settings).
- Select Site permissions.
Note: You must be a site owner or have at least Full Control permissions to make these changes. You can change Site Owner in SharePoint Online if needed.
Step 2. Adjust Site-Level Sharing Settings (If Needed)
Verify or reduce the site-level sharing setting, because a library can’t allow more sharing than the site.
- From the Site permissions panel, click Change how members can share.
- You’ll see options like:
- Anyone
- New and existing guests
- People in your organisation
- Only site owners
- Choose your preferred setting and click Save.
Step 3. Open Document Library Settings
- Now, go back to the site’s homepage.
- Click on the document library to configure.
- Click the gear icon > Library settings, or click the three dots and choose Settings.
If you’re specifically looking for how to change sharing options of document library in SharePoint, this is where you’ll find the controls.
Step 4. Change Library Permissions
Document libraries inherit permissions from the site by default. To set custom sharing options:
- In Library Settings, click Permissions for this document library.
- If you see a yellow banner stating that it inherits permissions, click Stop Inheriting Permissions.
- Now you can:
- Remove groups or users you don’t want
- Add groups or users with specific roles like Read, Edit, or Full Control
- Prevent sharing by not including users who shouldn’t access the library
Step 5. Disable Sharing Links (Optional)
To prevent users from sending or sharing links to files in the library:
- Open the library, click the three dots on a file
- Choose Manage access
- Remove any Can view or Can edit sharing links
- To stop future sharing via links, use a PowerShell policy or set a policy in the SharePoint Admin Center (see next section)
Advanced Settings from SharePoint Admin Center (Optional)
If you’re a SharePoint Admin, you can lock down sharing even more using these steps:
- Open Microsoft 365 Admin Center > SharePoint Admin Center
- Click Sites > Active Sites
- Choose your site > click Policies > Sharing
- Select the most appropriate sharing level for that site
If you need more control over how to change sharing options of document library in SharePoint, this centralised approach overrides the library-level settings.
I’ve used this to restrict sites used for internal audits to only people in your organisation.
Tools and Tips I Use
- PowerShell Cmdlets like Set-SPOSite to programmatically manage sharing levels. though in some cases, I’ve had to troubleshoot connection issues like Connect-SPOService: Could Not Connect to SharePoint Online.
- SharePoint Audit Logs to track who shared what and when
- Sensitivity labels to auto-apply sharing restrictions based on document content
Bottom Lines
Changing the sharing options of a document library in SharePoint isn’t complicated, but it’s critical for security. I always recommend reviewing these settings quarterly and backup SharePoint Online to Local Storage, especially for libraries that store sensitive data. I hope you now have a clear understanding of how to change sharing options of document library in SharePoint effortlessly.
People Also Ask
- Can I restrict sharing for just one document library in SharePoint?
Yes, you can change the sharing options for a specific document library by stopping permission inheritance and applying unique permissions.
- How to stop users from sharing files in a SharePoint document library?
To stop users from sharing files, disable sharing links using the Manage Access option on individual files.
- What happens if I change sharing settings on a SharePoint site? Will it affect all libraries?
Yes, changing site-level sharing settings applies to all libraries within the site.
- Can I allow external sharing for only one SharePoint document library?
Not directly. SharePoint Online doesn’t allow external sharing on a per-library basis if the site-level sharing setting blocks it.
- How to audit who shared content in a SharePoint document library?
You can use the Microsoft 365 compliance center or audit logs to view sharing activities. This helps you track and manage unauthorised sharing.
- Is PowerShell required to change document library sharing settings?
Not always. Most sharing changes can be done through the SharePoint UI. However, the PowerShell, such as the Set-SPOSite command, is useful for bulk changes.