> ## Content Index
> Fetch the complete content index at: https://www.techielass.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# Manage external sharing for SharePoint Online
- URL: https://www.techielass.com/manage-external-sharing-for-your-sharepoint-online/
- Published: 2017-11-27T06:00:00.000Z
- Updated: 2021-03-15T15:33:34.000Z
- Author: Sarah Lean
- Tags: SharePoint

I've recently been trying to share files and folders with external users from within my Office 365 tenant and have been having issues. Although the GUI was configured as per Microsoft's best practices I was still unable to share anything externally and was receiving the "**Your organization's policies don't allow you to share with these users. Go to External Sharing in the Office 365 admin center to enable it**" error message. ![externalsharingerror](https://www.techielass.com/wp-content/uploads/2017/11/externalsharingerror.png)

In order to resolve it I resorted to PowerShell! :)

## Configure SharePoint Online External Sharing with PowerShell

The first thing that you need to do is download the SharePoint Online Management Shell from - [https://www.microsoft.com/en-ca/download/confirmation.aspx?id=35588](https://www.microsoft.com/en-ca/download/confirmation.aspx?id=35588&ref=techielass.com) Once you've installed module launch it as administrator. Within your PowerShell session issue the following commands, replacing your information as necessary.

```
    $username = "admin@yourorg.com"
    $password = "password"
    $cred = New-Object -TypeName System.Management.Automation.PSCredential -argumentlist $userName, $(convertto-securestring $Password -asplaintext -force)
    Connect-SPOService -Url https://yourorg-admin.sharepoint.com/ -Credential $cred

```

The above connects you to your SharePoint online area. Now that you are connected you can query your SharePoint Online sites using the simple command:

```
    Get-SPOSite

```

This command will help show you what your SharePoint Online URLs are, as below: ![get-sposite](https://www.techielass.com/wp-content/uploads/2017/11/get-sposite.jpg) From here you can now issue the command required to enable External Sharing for your chosen site/sites. The command is:

```
    Set-SPOsite -identity https://yourorg.sharepoint.com -sharingcapability ExternalUserAndGuestSharing

```

Once completed this command gives you no feedback that it is completed successfully but once it has been issued you'll now be able to successfully share your files/folders with external users. ![successfulshare](https://www.techielass.com/wp-content/uploads/2017/11/successfulshare.png)

Happy sharing! I would love to hear your thoughts and experiences of External Sharing within SharePoint Online? Any pros and cons I should be aware of? Please follow me on Twitter [@TechieLass](https://www.twitter.com/TechieLass?ref=techielass.com) for other news, and tips.