Set Default Sharing to “People with Existing Access” in SharePoint Online
Tags: security, sharepointonline, sharepoint
Published: 2024-01-31 16:23:16

---
title: Set Default Sharing to “People with Existing Access” in SharePoint Online
published: true
date: 2024-01-31 12:01:11 UTC
tags: Security,SharePointOnline,SharePoint
canonical_url: https://blogit.create.pt/miguelisidoro/2024/01/31/set-default-sharing-to-people-with-existing-access-in-sharepoint-online/
---

This post will explain how to set default sharing of all SharePoint sites in the tenant to “Poeple with Existing Access”.

## Introduction

From a security standpoint, it is important to protect access to information to ensure that only the right people in an organization has access to it.

Users can share files and folders in Microsoft SharePoint by sending a link. They should select a link type based on the people to whom they want to give permission. The following link types are available:

- Anyone with the link (previously called “anonymous access” or “shareable”)
- People in your organization with the link
- People with existing access
- Specific people

By default, default sharing is configured to “People in [Organization”], meaning that when sharing or making use of the “Copy link” option to share a document with someone, the link you provide may be accessed by the whole organization. To prevent this, we can change the default sharing to “Poeple with Existing Access”, meaning that when sharing or making use of the “Copy link” option to share a document with someone, the link you provide may be accessed by people that already have access to the document, making it a more secure way to share a document with someone.

## The Code

The PowerShell script below allows you to change the default sharing to “People with Existing Access” for all sites in your tenant.

NOTE: For now,

```

Import-Module Microsoft.Online.SharePoint.PowerShell -DisableNameChecking
 
$AdminSiteUrl = "https://dev-admin.sharepoint.com"
 
#Connect to SharePoint Online
Connect-SPOService -Url $AdminSiteUrl
 
#Get All SharePoint Sites
$Sites = Get-SPOSite -Limit All

#Iterate each site and change the default sharing
ForEach ($Site in $Sites)
{
    $SiteUrl = $Site.URL
    Write-Host "Setting Sharing to DefaultLinkToExistingAccessin $SiteUrl" -ForegroundColor "Green"
    Set-SPOSite -identity $SiteUrl -DefaultLinkToExistingAccess 1
}

```

Sharing experience before running the script:

![](https://blogit.create.pt/wp-content/uploads/2024/01/Share_People_Organization.jpg)

Sharing experience after running the script:

![](https://blogit.create.pt/wp-content/uploads/2024/01/Share_Existing_Access.jpg)

## Related Articles

To learn why your business should migrate to SharePoint Online and Office 365, click [here](https://blogit.create.pt////miguelisidoro/2019/07/29/why-your-business-should-migrate-to-sharepoint-online-and-office-365-the-value-offer-part-1/) and [here](https://blogit.create.pt////miguelisidoro/2019/07/29/why-your-business-should-migrate-to-sharepoint-online-and-office-365-the-value-offer-part-2/).

If you want to learn how to develop SPFx solutions, click [here](https://dev.to/mlisidoro/sharepoint-framework-spfx-learning-guide-1fnf).

If you want to learn how you can rename a modern SharePoint site, click [here](https://blogit.create.pt////miguelisidoro/2019/09/23/how-to-rename-a-modern-sharepoint-site-url-in-office-365/).

If you want to learn how to save time time scheduling your meetings, click [here](https://blogit.create.pt////miguelisidoro/2020/04/12/save-time-scheduling-microsoft-teams-meetings-using-findtime/).

If you want to learn how to enable Microsoft Teams Attendance List Download, click [here](https://blogit.create.pt////miguelisidoro/2020/09/20/how-to-enable-teams-meeting-attendance-list-download-in-microsoft-365/).

If you want to learn how to create a dynamic org-wide team in Microsoft Teams with all active employees, click [here](https://blogit.create.pt/miguelisidoro/2020/09/21/how-to-create-a-dynamic-team-in-microsoft-teams-with-all-active-employees-in-microsoft-365/).

If you want to modernize your SharePoint classic root site to a modern SharePoint site, click [here](https://blogit.create.pt////miguelisidoro/2019/08/27/how-to-modernize-your-tenant-root-site-collection-in-office-365-using-invoke-spositeswap/).

If you are a SharePoint administrator or a SharePoint developer who wants to learn more about how to install a SharePoint 2019 farm in an automated way using PowerShell, I invite you to click [here](https://blogit.create.pt////miguelisidoro/2018/12/09/how-to-install-a-sharepoint-2019-farm-using-powershell-and-autospinstaller-part-1/) and [here](https://blogit.create.pt////miguelisidoro/2018/12/09/how-to-install-a-sharepoint-2019-farm-using-powershell-and-autospinstaller-part-2/).

If you learn how to greatly speed up your SharePoint farm update process to ensure your SharePoint farm keeps updated and you stay one step closer to start your move to the cloud, click [here](https://blogit.create.pt////miguelisidoro/2019/05/02/how-to-speed-up-the-installation-of-sharepoint-cumulative-updates-using-powershell-step-by-step/).

If you prefer to use the traditional method to update your farm and want to learn all the steps and precautions necessary to successfully keep your SharePoint farm updated, click [here](https://blogit.create.pt////miguelisidoro/2019/04/08/how-to-install-sharepoint-cumulative-updates-in-a-sharepoint-farm-step-by-step/).

If you want to learn how to upgrade a SharePoint 2013 farm to SharePoint 2019, click [here ](https://blogit.create.pt////miguelisidoro/2019/03/06/how-to-upgrade-from-sharepoint-2013-to-sharepoint-2019-step-by-step-part-1/)and [here](https://blogit.create.pt////miguelisidoro/2019/03/06/how-to-upgrade-from-sharepoint-2013-to-sharepoint-2019-step-by-step-part-2/).

If SharePoint 2019 is still not an option, you can learn more about how to install a SharePoint 2016 farm in an automated way using PowerShell, click [here](https://blogit.create.pt////miguelisidoro/2018/07/28/how-to-install-a-sharepoint-2016-farm-using-powershell-and-autospinstaller-part-1/) and [here](https://blogit.create.pt////miguelisidoro/2018/07/28/how-to-install-a-sharepoint-2016-farm-using-powershell-and-autospinstaller-part-2/).

If you want to learn how to upgrade a SharePoint 2010 farm to SharePoint 2016, click [here ](https://blogit.create.pt////miguelisidoro/2019/02/04/sharepoint-upgrade-upgrading-a-sharepoint-2010-farm-to-sharepoint-2016-step-by-step-part-1/)and [here](https://blogit.create.pt////miguelisidoro/2019/02/04/sharepoint-upgrade-upgrading-a-sharepoint-2010-farm-to-sharepoint-2016-step-by-step-part-2/).

If you are new to SharePoint and Office 365 and want to learn all about it, take a look at these [learning resources](https://blogit.create.pt////miguelisidoro/2018/10/17/sharepoint-and-office-365-learning-resources/).

If you are work in a large organization who is using Office 365 or thinking to move to Office 365 and is considering between a single or multiple Office 365 tenants, I invite you to read [this article](https://blogit.create.pt////miguelisidoro/2019/01/07/pros-and-cons-of-single-tenant-vs-multiple-tenants-in-office-365/).

If you want to know all about the latest SharePoint and Office 365 announcements from Ignite and some more recent announcements, including Microsoft Search, What’s New to Build a Modern Intranet with SharePoint in Office 365, Deeper Integration between Microsoft Teams and SharePoint and the latest news on SharePoint development, click [here](https://blogit.create.pt////miguelisidoro/2018/11/21/whats-new-for-sharepoint-and-office-365-after-microsoft-ignite-2018/).

If your organization is still not ready to go all in to SharePoint Online and Office 365, a hybrid scenario may be the best choice. SharePoint 2019 RTM was recently announced and if you to learn all about SharePoint 2019 and all its features, click [here](https://blogit.create.pt////miguelisidoro/2018/11/01/meet-the-new-modern-sharepoint-server-sharepoint-2019-rtm-is-here/).

Happy SharePointing!

The post [Set Default Sharing to “People with Existing Access” in SharePoint Online](https://blogit.create.pt/miguelisidoro/2024/01/31/set-default-sharing-to-people-with-existing-access-in-sharepoint-online/) appeared first on [Blog IT](https://blogit.create.pt).