How to Enable External Sharing in SharePoint Online? (2024)

Introduction

SharePoint Online allows inviting external users to collaborate on sites, libraries, lists, and files. This enhances productivity when working with people outside your organization. SharePoint admins can enable and control external sharing capabilities to balance secure collaboration. This comprehensive guide will go through the steps to enable external user sharing in SharePoint Online and OneDrive for Business.

Table of contents

  • Introduction
  • How to Enable External Sharing in SharePoint Online?
    • Step 1: Enable External Sharing at the Tenant
    • External collaboration – Advanced settings
    • SharePoint Online: How to Enable External Sharing Using PowerShell?
    • Allow External Sharing in SharePoint Online using PowerShell
    • Step 2: Enable External Sharing in SharePoint Online Site Collection
    • Allow External Sharing in SharePoint Online Site Collection using PowerShell
    • Enable External Users in SharePoint Online using PnP PowerShell
  • Set External Sharing Settings for All sites in the Tenant
  • How do I share a SharePoint file or folder with external users?
  • Conclusion

SharePoint Online allows you to collaboratively share your content with external users such as vendors, clients, customers, consultants, etc. To enable external sharing, you should turn on external sharing both at the tenant and site collection levels, either from the Admin center or with PowerShell. Let’s see how to enable external sharing in SharePoint Online so that you can share your documents and files with people outside your organization:

External Sharing settings in SharePoint Online offer the following options:

  • Only people in your organization – Disable external sharing!
  • Existing guests – Allow sharing only with the external users who already exist in your organization’s directory, Microsoft Entra.
  • New and existing guests – Allow external users who accept sharing invitations and sign in as authenticated users (Microsoft account or school account/work account to access shared items).
  • Anyone – Allow sharing with all external collaborators, including anonymous access links.

Step 1: Enable External Sharing at the Tenant

External sharing is disabled for SharePoint? You may see an error message, “You can only share within your organization.” if the external sharing is disabled for the site. To turn on external sharing in SharePoint Online tenant, follow these steps:

  1. Log in as a Global Administrator or SharePoint Administrator and Open SharePoint Online Admin Center under the Microsoft 365 admin center (Typically at: https://<tenant>-admin.sharepoint.com).
  2. Click on the Policies tab >> Sharing in the left navigation
  3. Under “External sharing” settings, set the sharing option to “New and existing guests” for better security. You can select any appropriate organization-level sharing settings for SharePoint and Microsoft OneDrive.
  4. Click on the “OK” button at the bottom to save your changes.

That’s all! External Sharing is now turned on.

External collaboration – Advanced settings

There are additional settings on the Sharing page under “More external sharing settings,” such as limiting external sharing using domains, allowing External users to accept sharing invitations using the same account that the invitations were sent to, etc. We also have “File and Folder links” permission settings. E.g., Sharing links settings default to “Specific People”, the Expiration time for “Anyone” links, default link type, etc.

We can allow external sharing in SharePoint Online using PowerShell as well. We can also set collaboration restrictions to limit sharing within specific domains. Alright, let’s see how to configure sharing capabilities in SharePoint Online using PowerShell.

For collaboration with people outside your organization, you need to share your documents and content externally. How do I enable external sharing in SharePoint Online with PowerShell? To enable external sharing in SharePoint Online, use the below PowerShell script:

#Set Admin Center URL$AdminCenterURL = "https://crescent-admin.sharepoint.com"#Connect to SharePoint OnlineConnect-SPOService -url $AdminCenterURL -Credential (Get-Credential)#sharepoint online enable external sharing powershellSet-SPOTenant -SharingCapability ExternalUserSharingOnly # Disabled, ExistingExternalUserSharingOnly, ExternalUserSharingOnly, ExternalUserAndGuestSharing (Anonymous sharing)

The PnP PowerShell version to set external collaboration settings would be:

#Parameters$TenantAdminURL = "https://crescent-admin.sharepoint.com" #Connect to Tenant Admin SiteConnect-PnPOnline -url $TenantAdminURL -Interactive #Enable External Sharing for the Tenant to - Anyone - Anonymous usersSet-PnPTenant -SharingCapability ExternalUserAndGuestSharing

You can also enable external sharing settings at the tenant level. Here is how to turn ON external sharing in SharePoint Online using PowerShell:

#Load SharePoint CSOM AssembliesAdd-Type -Path "C:\Program Files\SharePoint Online Management Shell\Microsoft.Online.SharePoint.PowerShell\Microsoft.SharePoint.Client.dll"Add-Type -Path "C:\Program Files\SharePoint Online Management Shell\Microsoft.Online.SharePoint.PowerShell\Microsoft.SharePoint.Client.Runtime.dll"Add-Type -Path "C:\Program Files\SharePoint Online Management Shell\Microsoft.Online.SharePoint.PowerShell\Microsoft.Online.SharePoint.Client.Tenant.dll"#Variables for processing$AdminCenterURL="https://crescent-admin.sharepoint.com"$SharingCapability="ExternalUserSharingOnly" # Disabled, ExistingExternalUserSharingOnly, ExternalUserSharingOnly, ExternalUserAndGuestSharing#Get Credentials to connect$Cred = Get-Credential#Setup the Context$Ctx = New-Object Microsoft.SharePoint.Client.ClientContext($AdminSiteURL)$Ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Cred.Username, $Cred.Password) #Get the tenant object $Tenant = New-Object Microsoft.Online.SharePoint.TenantAdministration.Tenant($Ctx) #Set Sharing capability of the tenant$Tenant.SharingCapability= [Microsoft.Online.SharePoint.TenantManagement.SharingCapabilities]::$SharingCapability$Ctx.ExecuteQuery()Write-host "Sharing Settings updated!"

Let us set External Sharing to allow guest users and anonymous links:

#Load SharePoint CSOM AssembliesAdd-Type -Path "C:\Program Files\SharePoint Online Management Shell\Microsoft.Online.SharePoint.PowerShell\Microsoft.SharePoint.Client.dll"Add-Type -Path "C:\Program Files\SharePoint Online Management Shell\Microsoft.Online.SharePoint.PowerShell\Microsoft.SharePoint.Client.Runtime.dll"Add-Type -Path "C:\Program Files\SharePoint Online Management Shell\Microsoft.Online.SharePoint.PowerShell\Microsoft.Online.SharePoint.Client.Tenant.dll"#Parameters$AdminSiteURL="https://crescent-admin.sharepoint.com"$SharingCapability="ExternalUserAndGuestSharing" #File and folder links$DaysToExpire = 7 #Expiration number of days for shared files$LinkType="View" #Edit, View or None$FolderLinkType="Edit" # View or Edit or None - Edit permissions set to Folders by default#Get Credentials to connect$Cred= Get-CredentialTry { #Setup the context $Ctx = New-Object Microsoft.SharePoint.Client.ClientContext($AdminSiteURL) $Ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Cred.Username, $Cred.Password) #Get the Tenant $Tenant= New-Object Microsoft.Online.SharePoint.TenantAdministration.Tenant($Ctx) $Ctx.Load($Tenant) $Ctx.ExecuteQuery() #Set Tenant Sharing Settings $Tenant.SharingCapability= [Microsoft.Online.SharePoint.TenantManagement.SharingCapabilities]::$SharingCapability $Tenant.RequireAnonymousLinksExpireInDays= $DaysToExpire $Tenant.FileAnonymousLinkType=[Microsoft.SharePoint.Client.AnonymousLinkType]::$LinkType $Tenant.FolderAnonymousLinkType=[Microsoft.SharePoint.Client.AnonymousLinkType]$FolderLinkType $Ctx.ExecuteQuery() Write-host "Tenant Sharing Settings Updated Successfully!'" -f Green}Catch { write-host -f Red "Error:" $_.Exception.Message}

This results in the following settings in the SharePoint Online tenant.

Turning ON External sharing at the tenant level doesn’t automatically turn ON Sharing capabilities at all underlying site collections! We need to enable sharing at each SharePoint Online site collection. You can set the sharing settings for any site collection from the SharePoint Admin Center. To allow external sharing at the site collection level using the new SharePoint Online admin center, follow these steps:

  1. Go to SharePoint Online Admin Center >> Click on Sites >> Active sites >> Select the desired Site collection from the list.
  2. Click on the “Sharing” button >> Set the sharing settings appropriately, such as “New and existing external users”. Click on “Save” to commit your changes.

Please note that the site collection’s sharing level must be equivalent to or less permissive than your organization-level settings! E.g., If you set the tenant level settings as “Existing external users”, then the SharePoint setting can be applied to “Existing external users” or below. The above steps apply to team sites, communication sites, and classic sites in SharePoint Online.

Use this PowerShell script to activate external sharing for the SharePoint Online site level.

#Variables for Admin Center & Site Collection URL$AdminCenterURL = "https://crescent-admin.sharepoint.com/"$SiteCollURL="https://crescent.sharepoint.com/Sites/Sales"#Connect to SharePoint OnlineConnect-SPOService -url $AdminCenterURL -Credential (Get-Credential)#Enable external sharing for the site collectionSet-SPOSite -Identity $SiteCollURL -SharingCapability ExternalUserSharingOnly#Other Options: Disabled, ExistingExternalUserSharingOnly, ExternalUserSharingOnly, ExternalUserAndGuestSharing

To enable external sharing specific site collection in SharePoint Online, use this PnP PowerShell:

#Parameters$TenantAdminURL = "https://crescent-admin.sharepoint.com"$SiteURL = "https://crescent.sharepoint.com/sites/marketing"#Connect to Tenant Admin SiteConnect-PnPOnline -url $TenantAdminURL -Interactive#Enable External Sharing for Existing AD Users (Including Guest users!)Set-PnPTenantSite -Url $SiteURL -SharingCapability ExistingExternalUserSharingOnly

This script turns on external sharing in SharePoint Online and sets the sharing option as the same as the above screenshot! Running this command will enable external user and guest sharing in an SPO site collection, and you can verify that in the Admin center.

Set External Sharing Settings for All sites in the Tenant

How about applying a specific external sharing setting on all site collections in the SharePoint Online tenant?

#Parameters$AdminCenterURL="https://crescent-admin.sharepoint.com"$ExternalSharingSetting = "ExternalUserAndGuestSharing" #AnyoneTry { #Connect to Admin center Connect-PnPOnline -URL $AdminCenterURL -Interactive #Get all sites where the setting is different from the given parameter - Exclude Seach Center, Redirect sites, Mysite Host, App Catalog, Content Type Hub, eDiscovery and Bots $SiteCollections = Get-PnPTenantSite | Where { $_.URL -like '*/sites*' -and $_.SharingCapability -ne $ExternalSharingSetting -and $_.Template -NotIn ` ("SRCHCEN#0", "REDIRECTSITE#0", "SPSMSITEHOST#0", "APPCATALOG#0", "POINTPUBLISHINGHUB#0", "EDISC#0", "STS#-1")} #Loop through each site and enable external sharing ForEach ($Site in $SiteCollections) { #Apply External sharing setting for the site Set-PnPTenantSite -Url $Site.Url -SharingCapability $ExternalSharingSetting Write-host "External sharing Setting updated for:" $Site.URL -f Green }}Catch { Write-host -f Red "Error:" $_.Exception.Message}

To get the list of all SharePoint Online Sites where sharing capability has been enabled:

Get-SPOSite | Where {$_.SharingCapability -ne "Disabled"}

Here is another post to disable external sharing: SharePoint Online: PowerShell to Disable External Sharing

All right, we have enabled external sharing. How do we share the SharePoint content with an external user? Well, you can select the file or folder, click the “Share” button, and enter the external user’s email address. You can also set the permission level.

Similarly, to stop sharing a document with an external user, navigate to the location where the document is stored and click on “Manage access.” From there, you can remove the external user’s permissions or completely stop sharing the document. Related posts here:

  • How to Share a Site and Invite External Users to SharePoint Online?
  • How to Share a File or Folder with External Users in SharePoint Online?

Conclusion

In conclusion, enabling external sharing in SharePoint Online is a straightforward process that can be completed by navigating to the SharePoint Admin Center and adjusting the sharing settings. Additionally, by configuring external sharing settings for specific sites, administrators can have more control over how and with whom content is shared. Overall, external sharing in SharePoint Online is a powerful feature that allows organizations to collaborate and share information with partners, customers, and other external stakeholders.

What is external sharing in SharePoint?

External sharing allows you to share SharePoint Online content with people outside your organization so they can view or collaborate on files and folders, even if they don’t have access to your network or SharePoint instance. You can share content with customers, partners, vendors, or others by sending them an invitation to access your sites and files.

How do I add everyone except external users in SharePoint Online?

Enable the “Everyone except external users” claim, and then you can add everyone except external users to SharePoint Online.
More info: Grant Access to everyone except external users Group in SharePoint Online

How do I Remove an External user from SharePoint Online?

You can remove external users from the SharePoint Online site using the PowerShell cmdlet Remove-SPOExternalUser.
More info: Remove external user from SharePoint Online

How to provide access to external users in SharePoint Online?

Assuming external sharing is enabled, follow these steps to provide access to an external user on a SharePoint site: Login to your SharePoint Online site >> Click on the “Share” button from the top-right section of the page. Enter the Emails of External users, make sure the “Send Email” checkbox is ticked, and click on the “Share” button at the bottom.
More info: Grant access to external users in SharePoint Online

How do I enable OneDrive external sharing?

To enable external sharing for OneDrive: On the SharePoint Admin center, expand “Policies” and click the “Sharing” link in the left navigation. Under the “External sharing”, set the configuration to anything other than “Only people in your organization”.
More info: Enable external sharing in OneDrive for Business using PowerShell

What are the security best practices for external sharing in SharePoint?

Implementing multi-factor authentication (MFA) for external users, granting the minimum necessary permissions, using expiring links, creating data loss prevention (DLP) policies, and Reviewing external sharing activity are recommended security practices when sharing content externally in SharePoint.

Is there an expiration option for external sharing links?

Yes, SharePoint Online allows you to set expiration dates for shared links. This means that the link will only work until the specified date, after which it will automatically become invalid, enhancing the security of shared documents.

How do I turn off guest access in SharePoint?

To turn off guest access in SharePoint, Go to the SharePoint Admin Center, locate the “Policies” section, and click “Sharing”. Set it to “Only people in your organization” to disable external users for your SharePoint Online tenant.

Related Posts

How to Enable External Sharing in SharePoint Online? (2024)
Top Articles
Infra trumps sectoral mutual fund peers with 29% returns in 2024, so far. Should you invest?
This Math Problem for Five-Year-Olds Has the Internet Stumped
Craigslist San Francisco Bay
Thor Majestic 23A Floor Plan
Hotels
Vaya Timeclock
Culver's Flavor Of The Day Wilson Nc
Polyhaven Hdri
Mohawkind Docagent
Bloxburg Image Ids
Jesus Revolution Showtimes Near Chisholm Trail 8
Progressbook Brunswick
Raid Guides - Hardstuck
Items/Tm/Hm cheats for Pokemon FireRed on GBA
Rosemary Beach, Panama City Beach, FL Real Estate & Homes for Sale | realtor.com®
Drago Funeral Home & Cremation Services Obituaries
Shreveport Active 911
978-0137606801
Sony E 18-200mm F3.5-6.3 OSS LE Review
Gon Deer Forum
Youravon Comcom
Webcentral Cuny
Vintage Stock Edmond Ok
Td Small Business Banking Login
Pickswise Review 2024: Is Pickswise a Trusted Tipster?
Bernie Platt, former Cherry Hill mayor and funeral home magnate, has died at 90
Kohls Lufkin Tx
Foodsmart Jonesboro Ar Weekly Ad
Craigslist Fort Smith Ar Personals
Pioneer Library Overdrive
County Cricket Championship, day one - scores, radio commentary & live text
Fairwinds Shred Fest 2023
Bee And Willow Bar Cart
Frcp 47
Hingham Police Scanner Wicked Local
Rochester Ny Missed Connections
Tiny Pains When Giving Blood Nyt Crossword
Shane Gillis’s Fall and Rise
All Characters in Omega Strikers
Umd Men's Basketball Duluth
Wilson Tire And Auto Service Gambrills Photos
Advance Auto.parts Near Me
Graduation Requirements
40X100 Barndominium Floor Plans With Shop
Fresno Craglist
Wild Fork Foods Login
Sleep Outfitters Springhurst
Dmv Kiosk Bakersfield
Parks And Rec Fantasy Football Names
Att Corporate Store Location
Qvc Com Blogs
Latest Posts
Article information

Author: The Hon. Margery Christiansen

Last Updated:

Views: 5674

Rating: 5 / 5 (70 voted)

Reviews: 85% of readers found this page helpful

Author information

Name: The Hon. Margery Christiansen

Birthday: 2000-07-07

Address: 5050 Breitenberg Knoll, New Robert, MI 45409

Phone: +2556892639372

Job: Investor Mining Engineer

Hobby: Sketching, Cosplaying, Glassblowing, Genealogy, Crocheting, Archery, Skateboarding

Introduction: My name is The Hon. Margery Christiansen, I am a bright, adorable, precious, inexpensive, gorgeous, comfortable, happy person who loves writing and wants to share my knowledge and understanding with you.