豆子今天早上收到一个用户请求,要求他们部门的sharepoint site可以和外网用户共享资源。我的第一个反应应该很容易的吧,直接登录Office365的管理界面,然后在Sharepoint admin Center里面修改下面的设置就行了。回答错误!!

SharePoint Online和外网用户共享资源

修改了上面的设置 还是不能和外部共享,捉急~
SharePoint Online和外网用户共享资源

给微软的在线客服请教了一下,发现原来解决的方法需要通过PowerShell命令来修改对应的site属性。每个site默认的共享属性是 only existing external user sharing is enabled, 如果想让任何外人或者指定的外人访问,需要修改SharingCapability这个属性的值。

具体操作:

  1. 下载安装Sharepoint online Powershell 模块
    https://www.microsoft.com/en-us/download/details.aspx?id=35588

  2. 安装完成之后连接加载
$username = "xxx@aaa.com"
$secureStringPwd = ConvertTo-SecureString -AsPlainText "password" -Force
$creds = New-Object System.Management.Automation.PSCredential -ArgumentList $username, $secureStringPwd

Connect-SPOService -Url https://aaa-admin.sharepoint.com/ -Credential $creds

3.查看一下当前site的共享属性

PS C:\WINDOWS\system32> Get-SPOSite | select url, owner, SharingCapability

Url                                                                             Owner                                                    SharingCapability
---                                                                             -----                                                    -----------------
https://ddbaustralia.sharepoint.com/sites/LAMTreeReOrganisationProject                                                     ExistingExternalUserSharingOnly
https://ddbaustralia.sharepoint.com/sites/Finance                                                                          ExistingExternalUserSharingOnly
https://ddbaustralia.sharepoint.com/portals/community                                                                                             Disabled
https://ddbaustralia.sharepoint.com/sites/TrackSydney                                                                      ExistingExternalUserSharingOnly
https://ddbaustralia.sharepoint.com/sites/McDonald'sSydneyCRM                                                              ExistingExternalUserSharingOnly
https://ddbaustralia.sharepoint.com/sites/Camperdown                            ashkan.deravi@syd.ddb.com                  ExistingExternalUserSharingOnly
https://ddbaustralia.sharepoint.com/sites/trackanz                                                                         ExistingExternalUserSharingOnly
https://ddbaustralia.sharepoint.com/sites/Test67                                                                           ExistingExternalUserSharingOnly
https://ddbaustralia.sharepoint.com/sites/projects                              yuan.li@aus.ddb.com                                               Disabled
https://ddbaustralia.sharepoint.com/sites/WestpacRetail                                                                    ExistingExternalUserSharingOnly
https://ddbaustralia.sharepoint.com/sites/DDBSydney16                                                                      ExistingExternalUserSharingOnly
https://ddbaustralia.sharepoint.com/sites/GroupAustraliaCasperTeams                                                        ExistingExternalUserSharingOnly
https://ddbaustralia.sharepoint.com/sites/Test61                                                                           ExistingExternalUserSharingOnly
https://ddbaustralia.sharepoint.com/sites/DDBSydneyStudio                                                                  ExistingExternalUserSharingOnly
https://ddbaustralia.sharepoint.com/sites/RemedyDigital                                                                    ExistingExternalUserSharingOnly
https://ddbaustralia.sharepoint.com/sites/LAM52                                                                            ExistingExternalUserSharingOnly
https://ddbaustralia.sharepoint.com/sites/Skoda                                              

纯属好奇,看了看一共有129个站点。小小的吐槽一下,Office365的网页管理界面比较坑,只给我展示了10多个,其他上百个站点的属性界面就给我隐藏了,怎么也没找着,有人知道怎么看的话请告诉我一下... 不知道这个是微软故意的还是功能不齐.. 类似的情况 PowerShell工作但是图形界面不行的情况遇见很多次了..

PS C:\WINDOWS\system32> Get-SPOSite | measure

Count    : 129
Average  : 
Sum      : 
Maximum  : 
Minimum  : 
Property : 
  1. 修改一下我们需要共享的站点属性
PS C:\WINDOWS\system32> Set-SPOSite -Identity https://ddbaustralia.sharepoint.com/sites/groupaustraliait -SharingCapability ExternalUserAndGuestSharing
  1. 然后打开对应的网站,试试看共享设置,搞定,可以和外部分享数据了

SharePoint Online和外网用户共享资源

  1. 如果上面还不行,可能还需要在这个site本身的site permission上进行授权 这样就行了

SharePoint Online和外网用户共享资源

7.确认一下外网邮件收到的邀请
SharePoint Online和外网用户共享资源