SharePoint Online和外网用户共享资源

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了SharePoint Online和外网用户共享资源相关的知识,希望对你有一定的参考价值。

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

技术分享图片

修改了上面的设置 还是不能和外部共享,捉急~
技术分享图片

给微软的在线客服请教了一下,发现原来解决的方法需要通过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 = "[email protected]"
$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                            [email protected]                  ExistingExternalUserSharingOnly
https://ddbaustralia.sharepoint.com/sites/trackanz                                                                         ExistingExternalUserSharingOnly
https://ddbaustralia.sharepoint.com/sites/Test67                                                                           ExistingExternalUserSharingOnly
https://ddbaustralia.sharepoint.com/sites/projects                              [email protected]                                               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. 然后打开对应的网站,试试看共享设置,搞定,可以和外部分享数据了

技术分享图片

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

技术分享图片

7.确认一下外网邮件收到的邀请
技术分享图片

以上是关于SharePoint Online和外网用户共享资源的主要内容,如果未能解决你的问题,请参考以下文章

SharePoint Online 选择性脱机同步

SharePoint Online 开发篇:SharePoint Hosted Apps获取用户ID

如何在 Sharepoint Online 中启用 CORS

检查用户是否可以访问SharePoint Online站点

Windows 设置内网和外网同时使用

如何通过 REST API 在另一台服务器上为 Sharepoint 2013 和 Sharepoint Online 运行的脚本中更新 SharePoint 列表?