前兩篇介紹的是關于Exchange 與 Lync 之間的配制關系,這一篇介紹關于Lync、Exchange 與 SharePoint 之間建立信任關系。
首先要建立基于SSL的SharePoint Application,端口是 443,同時還要通過CA申請證書,否則在建立信任關系時,會出現錯誤。
![](https://img.laitimes.com/img/__Qf2AjLwojIjJCLyojI0JCLicmbw5iN2IWZ4I2MyMzYmFWN4ATOiVmN0QmZ1AzM4UGMmVWN00iM1cjMyETOx8CX5AzMxAjMvwVNxATOxMzLcd2bsJ2Lc12bj5ycn9Gbi52YuAzcldWYtl2Lc9CX6MHc0RHaiojIsJye.png)
$shp = Get-CsPartnerApplication microsoft.sharepoint -ErrorAction SilentlyContinue
if ($shp -eq $null)
{
New-CsPartnerApplication -Identity microsoft.sharepoint -MetadataUrl https://lyncsp.t.com.cn/_layouts/15/metadata/json/1 -ApplicationTrustLevel Full
}
else
{
if ($shp.ApplicationIdentifier -ne "00000003-0000-0ff1-ce00-000000000000")
{
Remove-CsPartnerApplication microsoft.sharepoint
New-CsPartnerApplication -Identity microsoft.sharepoint -MetadataUrl https://lyncsp.t.com.cn/_layouts/15/metadata/json/1 -ApplicationTrustLevel Full
}
else
{
Set-CsPartnerApplication -Identity microsoft.sharepoint -ApplicationTrustLevel Full
}
}
Set-CsOAuthConfiguration -ServiceName 00000004-0000-0ff1-ce00-000000000000
-MetadataUrl https://lyncsp.t.com.cn/_layouts/15/metadata/json/1 /_layouts/15/metadata/json/1 是固定的不能修改。
SharePoint 2013 引入了電子資料中心,好像很不錯的,有時間可以了解一下
http://technet.microsoft.com/zh-cn/sharepoint/jj650012.aspx
Exchange 與 SharePoint 建立信任關系
建立 TokenIssuer
New-SPTrustedSecurityTokenIssuer –MetadataEndpoint "https://Ex2013.t.com.cn/autodiscover/metadata/json/1" –Name "Ex2013"
配置 SharePoint 2013 伺服器權限
$Snapin = get-PSSnapin | Where-Object {$_.Name -eq 'Microsoft.SharePoint.Powershell'}
if($Snapin -eq $null){
Write-host "Loading SharePoint Powershell Snapin"
Add-PSSnapin "Microsoft.SharePoint.Powershell"
}
$exchange=Get-SPTrustedSecurityTokenIssuer
$app=Get-SPAppPrincipal -Site https://elecdata.t.com.cn -NameIdentifier $exchange.NameId
$site=Get-SPSite https://elecdata.t.com.cn
Set-SPAppPrincipalPermission –AppPrincipal $app –Site $site.RootWeb –Scope sitesubscription –Right fullcontrol -EnableAppOnlyPolicy
在 Exchange 伺服器上執行如下指令
cd c:\'Program Files'\Microsoft\'Exchange Server'\V15\Scripts
.\Configure-EnterprisePartnerApplication.ps1 -AuthMetadataUrl https://elecdata.t.com.cn/_layouts/15/metadata/json/1 -ApplicationType SharePoint
參考:
http://technet.microsoft.com/zh-cn/library/jj655399.aspx
http://technet.microsoft.com/ZH-CN/library/jj204975.aspx