在 SharePoint Server 中設定網站信箱Configure site mailboxes in SharePoint Server

摘要: 設定小組電子郵件的 Exchange Server、SharePoint Server 2016 和 SharePoint Server 2013,方法為使用 Site Mailboxes 功能。Summary: Configure Exchange Server, SharePoint Server 2016 and SharePoint Server 2013for team email by using the Site Mailboxes feature.

本文描述如何設定 SharePoint Server 及 Exchange Server 中的網站信箱。網站信箱功能可在網站上提供小組電子郵件給 SharePoint Server 使用者。網站信箱也在 Microsoft Outlook 中提供 SharePoint 文件庫連結,讓使用者能夠和其他共同合作專案的小組成員共用檔案及電子郵件訊息。This article describes how to configure Site Mailboxes in SharePoint Server and Exchange Server. The Site Mailboxes feature provides SharePoint Server users with team email on a site. Site Mailboxes also provides links to SharePoint document libraries in Microsoft Outlook, enabling users to share files and email messages with other members of a team that are working on a joint project.

開始之前Before you begin

開始這項作業之前,請參閱下列有關先決條件的資訊:Before you begin this operation, review the following information about prerequisites:

  • 網站信箱需要 Exchange Server 2016 或 Exchange Server 2013。Site Mailboxes requires Exchange Server 2016 or Exchange Server 2013.

  • 必須從 SharePoint 伺服器解除安裝所有的舊版 Exchange Web 服務 (EWS)。Any previous version of Exchange Web Services (EWS) will need to be uninstalled from the SharePoint servers.

    注意

    您可能需要判斷是否安裝了舊版的 EWS。如果是,請執行以下參考的 Check-SiteMailboxConfig 指令碼。You may need to determine if a previous version of EWS is installed. If so, please run the Check-SiteMailboxConfig script referenced below.

  • 網站信箱功能需要在伺服器陣列中設定使用者設定檔同步處理。如需設定使用者設定檔同步處理的資訊,請參閱規劃使用者設定檔及身分識別管理 SharePoint Server 中的使用者設定檔同步處理Site Mailboxes feature requires that user profile synchronization be configured in the farm. For information about configuring user profile synchronization, see User profiles and identities, and Manage user profile synchronization in SharePoint Server.

  • 網站信箱功能需要在伺服器陣列中設定應用程式管理服務應用程式。如需設定應用程式管理服務應用程式的相關資訊,請參閱 New-SPAppManagementServiceApplicationSite Mailboxes feature requires that the app management service application be configured in the farm. For information about configuring the app management service application, see New-SPAppManagementServiceApplication.

  • 對於在支援伺服器對伺服器驗證及應用程式驗證的案例中所部署的 Web 應用程式,預設區域必須設定安全通訊端層 (SSL)。執行 SharePoint Server 的電腦必須設定 SSL,這是設定網站信箱的必要條件。如需詳細資訊,請參閱在 SharePoint Server 中建立宣告式 web 應用程式,並遵循建立 SSL 網站集合及伺服器憑證的步驟。Secure Sockets Layer (SSL) configured for the Default Zone is a requirement for web applications that are deployed in scenarios that support server-to-server authentication and app authentication. This is such a scenario. As a prerequisite for configuring Site Mailboxes, the computer that is running SharePoint Server must have SSL configured. For more information, see Create claims-based web applications in SharePoint Server and follow the steps for creating an SSL site collection and server certificate.

請注意,可能需要將 Exchange Server SSL 憑證從 Exchange Server 匯入 SharePoint Server,並且從 SharePoint Server 匯入 Exchange Server。只有在 API 端點不信任憑證時才需要這麼做 (例如實驗室環境下的 Self-SSL 憑證)。若要將不信任 SSL 憑證匯入新的伺服器中:You may need to import the Exchange Server SSL certificate from Exchange 2013 to SharePoint 2013, and from SharePoint 2013 to Exchange 2013. This is only necessary if the certificate is not trusted for the API endpoints (such as a Self-SSL Certificate in a lab environment).

  • 開啟 Internet Explorer 並瀏覽至 Outlook Web App (若部署在 SharePoint Server 上) 或 SSL SharePoint 網站 (若部署在 Exchange Server 上):https://<ExServerName>/owa 或 https://<SP_FQDN>。Open Internet Explorer and navigate to Outlook Web App (if the deployment is on SharePoint Server) or the SSL SharePoint site (if the deployment is on Exchange Server): https:///owa or https://<SP_FQDN>.
  • 按一下 [繼續瀏覽網站]**** 接受信任此憑證。Accept to trust the certificate by clicking Continue to website.
  • 按一下 Internet Explorer 中網址列旁的 [憑證錯誤]**** 資訊,然後按一下 [檢視憑證]*Click *Certificate Error info in Internet Explorer next to the Address bar, and then click View Certificates.
  • 選取 [安裝憑證]*,然後選取 [將所有憑證放入以下的存放區]Select **Install Certificate* and then select Place all certificates in the following store.
  • 選取核取方塊以顯示實體存放區。Select the checkbox to show physical stores.
  • 安裝憑證至 [信任的根憑證授權] > [本機電腦]。Install the certificate to Trusted Root Certification Authorities > Local Computer.

  • 您必須是 SharePoint 及 Exchange Server 管理員群組,且具有包含使用者信箱的可作業 Exchange Server,才能執行這些程序。In order to perform these procedures, you must be a member of the SharePoint and Exchange Server administrator groups and have an operational Exchange Server with end-user mailboxes.

  • SharePoint 備份解決方案並未納入 Exchange 網站信箱。Exchange 系統管理員務必適時對網站信箱進行備份。A SharePoint backup solution will not incorporate Exchange site mailboxes. An Exchange administrator will need to ensure timely backups of site mailboxes are taking place.

  • 從網站信箱存取 SharePoint 文件庫中之檔案的使用者,必須在瀏覽器中將文件庫設定為信任的網站,否則會出現警告詢問使用者是否要信任此網站。Users who access files in a SharePoint document library from a Site Mailbox must have the document library configured as a trusted site in their browser or a warning will appear that asks the user if she or he wants to trust the file.

設定 SharePoint Server 中網站信箱的 SharePointConfigure SharePoint for Site Mailboxes in SharePoint Server

設定網站信箱的第一個步驟是在 SharePoint Server 伺服器陣列中的每部 Web 和應用程式伺服器上安裝 Exchange Server Web Services API。The first step in configuring Site Mailboxes is to install the Exchange Server Web Services API on each web and application server in the SharePoint Server farm.

在 SharePoint Server 上安裝 Exchange Web Services APIInstall Exchange Web Services API on SharePoint Server

  1. Microsoft 下載中心 下載 EWSManagedAPI.msi,並將其儲存至每部 web 和應用程式伺服器上的資料夾。Download EWSManagedAPI.msi from the Microsoft Download Centerhttps://www.microsoft.com/en-us/download/details.aspx?id=42951 and save it to a folder on each web and application server.

  2. 以管理員身分開啟命令視窗並瀏覽至您儲存 EWSManagedAPI.msi 所在的資料夾。Open a command window as administrator and navigate to the folder where you saved EWSManagedAPI.msi.

  3. 執行下列命令:Run the following command:

    msiexec /I EwsManagedApi.msi addlocal="ExchangeWebServicesApi_Feature,ExchangeWebServicesApi_Gac"
    
  4. 輸入 IISReset以從命令列重設 IIS。Reset IIS from the command line by typing IISReset.

在 SharePoint Server 上建立 OAuth 信任及服務權限Establish OAuth Trust and Service Permissions on SharePoint Server

下一個步驟是複製下列兩個指令碼。第一個指令碼應儲存為 Set-SiteMailboxConfig.ps1,而第二個指令碼應儲存為 Check-SiteMailboxConfig.ps1。The next step is to copy the following two scripts. The first should be saved as Set-SiteMailboxConfig.ps1 and the second should be saved as Check-SiteMailboxConfig.ps1.

Set-SiteMailboxConfig.ps1:Set-SiteMailboxConfig.ps1:

# .SYNOPSIS
#
# Set-SiteMailboxConfig helps configure Site Mailboxes for a SharePoint farm
#
# .DESCRIPTION
#
# Establishes trust with an Exchange Server, sets Site Mailbox settings and enables Site Mailboxes for a farm.
#
# .PARAMETER ExchangeSiteMailboxDomain
#
# The FQDN of the Exchange Organization where Site Mailboxes will be created
#
# .PARAMETER ExchangeAutodiscoverDomain
#
# [Optional] The FQDN of an Exchange Autodiscover Virtual Directory
#
# .PARAMETER WebApplicationUrl
#
# [Optional] The URL of a specific web application to configure. If not specified all Web Applications will be configured
#
# .PARAMETER Force
#
# [Optional] Indicate that the script should ignore any configuration issues and enable Site Mailboxes anyway
#
Param
(
   [Parameter(Mandatory=$true)]
   [ValidateNotNullOrEmpty()]   
   [string]$ExchangeSiteMailboxDomain,
   [Parameter(Mandatory=$false)]
   [ValidateNotNullOrEmpty()]   
   [string]$ExchangeAutodiscoverDomain,
   [Parameter(Mandatory=$false)]
   [ValidateNotNullOrEmpty()]   
   [string]$WebApplicationUrl,
   [Parameter(Mandatory=$false)]
   [switch]$Force
)
$script:currentDirectory = Split-Path $MyInvocation.MyCommand.Path
if($WebApplicationUrl -ne $NULL -and $WebApplicationUrl -ne "")
{
    $webapps = Get-SPWebApplication $WebApplicationUrl
}
else
{
    $webapps = Get-SPWebApplication
}
if($webapps -eq $NULL)
{
    if($WebApplicationUrl -ne $NULL)
    {
        Write-Warning "No Web Application Found at $($WebApplicationUrl). Please create a web application and re-run Set-SiteMailboxConfig"
    }
    else
    {
        Write-Warning "No Web Applications Found. Please create a web application and re-run Set-SiteMailboxConfig"
    }

    return
}
$rootWeb = $NULL
foreach($webapp in $webapps)
{
    if($rootWeb -eq $NULL)
    {
        $rootWeb = Get-SPWeb $webApp.Url -EA SilentlyContinue
    }
}
if($rootWeb -eq $NULL)
{
    Write-Warning "Unable to find a root site collection. Please create a root site collection on a web application and re-run Set-SiteMailboxConfig"
    return
}
$exchangeServer = $ExchangeAutodiscoverDomain
if($exchangeServer -eq $NULL -or $exchangeServer -eq "")
{
    $exchangeServer = "autodiscover.$($ExchangeSiteMailboxDomain)"
}
Write-Host "Establishing Trust with Exchange Server: $($exchangeServer)"
$metadataEndpoint = "https://$($exchangeServer)/autodiscover/metadata/json/1"
$exchange = Get-SPTrustedSecurityTokenIssuer | Where-Object { $_.MetadataEndpoint -eq $metadataEndpoint }
if($exchange -eq $NULL)  
{
    $exchange = New-SPTrustedSecurityTokenIssuer -Name $exchangeServer -MetadataEndPoint $metadataEndpoint
}
if($exchange -eq $NULL)
{
    Write-Warning "Unable to establish trust with Exchange Server $($exchangeServer). Ensure that $($metadataEndpoint) is accessible."
    if($ExchangeAutodiscoverDomain -eq $NULL -or $ExchangeAutodiscoverDomain -eq "")
    {
        Write-Warning "If $($metadataEndpoint) does not exist you may specify an alternate FQDN using ExchangeAutodiscoverDomain."
    }
    return
}
Write-Host "Granting Permissions to Exchange Server: $($exchangeServer)"
$appPrincipal = Get-SPAppPrincipal -Site $rootWeb.Url -NameIdentifier $exchange.NameId
Set-SPAppPrincipalPermission -AppPrincipal $appPrincipal -Site $rootWeb -Scope SiteSubscription -Right FullControl -EnableAppOnlyPolicy
Write-Host
Write-Host
Write-Host "Verifying Site Mailbox Configuration"
$warnings = &amp; $script:currentDirectory\Check-SiteMailboxConfig.ps1 -ReturnWarningState
if($warnings -and -not $Force)
{
    Write-Warning "Pre-requisites not satisfied. Stopping Set-SiteMailboxConfig. Use -Force to override"
    return
}
elseif($warnings)
{
    Write-Warning "Pre-requisites not satisfied. -Force used to override"
}
foreach($webapp in $webapps)
{
    Write-Host "Configuring Web Application: $($webapp.Url)"
    Write-Host "Setting Exchange Site Mailbox Domain to $($ExchangeSiteMailboxDomain)"
    $webapp.Properties["ExchangeTeamMailboxDomain"] = $ExchangeSiteMailboxDomain

    if($ExchangeAutodiscoverDomain -ne $NULL -and $ExchangeAutodiscoverDomain -ne "")
    {
        Write-Host "Setting Exchange Autodiscover Domain to $($ExchangeAutodiscoverDomain)"
        $webapp.Properties["ExchangeAutodiscoverDomain"] = $ExchangeAutodiscoverDomain;
    }
    $webapp.Update()
}
$feature = Get-SPFeature CollaborationMailboxFarm -Farm -ErrorAction Ignore
if($feature -eq $NULL)
{
    Write-Host "Enabling Site Mailboxes for Farm"
    Enable-SPFeature CollaborationMailboxFarm
}
else
{
    Write-Host "Site Mailboxes already enabled for Farm"
}

Check-SiteMailboxConfig.ps1:Check-SiteMailboxConfig.ps1:

Param
(
   [Parameter(Mandatory=$false)]
   [ValidateNotNullOrEmpty()]   
   [switch]$ReturnWarningState
)
Add-PSSnapin Microsoft.SharePoint.Powershell
$anyWarnings = $false
Write-Host "Step 1: Checking for Exchange Web Services"
try
{
    $assm = [System.Reflection.Assembly]::Load("Microsoft.Exchange.WebServices, Version=15.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35")
    if($assm.GlobalAssemblyCache)
    {
        Write-Host -Foreground Green "Found Exchange Web Services in Global Assembly Cache"
        Write-Host "Exchange Web Services Version: $([System.Diagnostics.FileVersionInfo]::GetVersionInfo($assm.Location).FileVersion)"
    }
    else
    {
        Write-Warning "Unable to find Exchange Web Services in Global Assembly Cache"
        $anyWarnings = $true
    }
}
catch
{
    Write-Warning "Unable to find Exchange Web Services in Global Assembly Cache"
    $anyWarnings = $true
}
Write-Host
Write-Host
Write-Host "Step 2: Checking for https web application"
$webapps = Get-SPWebApplication -EA SilentlyContinue
$rootWeb = $NULL
if($webapps -ne $NULL)
{
    $sslWebAppExists = $false
    foreach($webapp in $webapps)
    {
        if($rootWeb -eq $NULL)
        {
            $rootWeb = Get-SPWeb $webApp.Url -EA SilentlyContinue
        }
        if(-not $webapp.Url.StartsWith("https://"))
        {
            Write-Warning "Web Application at $($webapp.Url) does not use HTTPS. Site Mailboxes will not work on this Web Application."
        }
        else
        {
            $sslWebAppExists = $true
            Write-Host -Foreground Green "Found Web Application at $($webapp.Url) that uses HTTPS"
        }
    }
    if(-not $sslWebAppExists)
    {
        Write-Warning "At least one Web Application must be configured for HTTPS in the default zone."
        $anyWarnings = $true
    }
}
else
{
    Write-Warning "No Web Applications Found. Please create a web application and re-run Check-SiteMailboxConfig"
    $anyWarnings = $true
    if($ReturnWarningState)
    {
        return $anyWarnings
    }
    return;
}
if($rootWeb -eq $NULL)
{
    Write-Warning "Unable to find any Sites. Please create a root site collection on a web application and re-run Check-SiteMailboxConfig"
    $anyWarnings = $true
    if($ReturnWarningState)
    {
        return $anyWarnings
    }
    return;
}
# Get App Permissions Management Objects
$appPrincipalManager = [Microsoft.SharePoint.SPAppPrincipalManager]::GetManager($rootWeb)
$appPrincipalPermissionsManager = New-Object -TypeName Microsoft.SharePoint.SPAppPrincipalPermissionsManager -ArgumentList $rootWeb        
Write-Host
Write-Host
Write-Host "Step 3: Checking for trusted Exchange Servers"
$trustedIssuers = Get-SPTrustedSecurityTokenIssuer
$trustedIssuerHosts = @()
if($trustedIssuers -ne $NULL)
{
    $foundTrustedIssuer = $false
    foreach($trustedIssuer in $trustedIssuers)
    {
        if($trustedIssuer.RegisteredIssuerName.StartsWith("00000002-0000-0ff1-ce00-000000000000@"))
        {
            if($trustedIssuer.IsSelfIssuer)
            {
                $foundTrustedIssuer = $true
                $uri = New-Object -TypeName System.Uri -ArgumentList $trustedIssuer.MetadataEndPoint

                Write-Host -Foreground Green "Found trusted Exchange Server at $($uri.Host)"
                $appPrincipalName = [Microsoft.SharePoint.SPAppPrincipalName]::CreateFromNameIdentifier($trustedIssuer.RegisteredIssuerName)
                $appPrincipal = $appPrincipalManager.LookupAppPrincipal([Microsoft.SharePoint.SPAppPrincipalIdentityProvider]::External, $appPrincipalName);

                if($appPrincipal -ne $NULL)
                {
                    $isValidAppPrincipal = $true;
                    if($appPrincipalPermissionsManager.GetAppPrincipalSiteSubscriptionContentPermission($appPrincipal) -eq [Microsoft.SharePoint.SPAppPrincipalPermissionKind]::FullControl)
                    {
                        Write-Host -Foreground Green "Exchange Server at $($uri.Host) has Full Control permissions"

                    }
                    else
                    {
                        Write-Warning "Exchange Server at $($uri.Host) does not have Full Control permissions"
                        $isValidAppPrincipal = $false;
                        $anyWarnings = $true
                    }
                    if($appPrincipalPermissionsManager.IsAppOnlyPolicyAllowed($appPrincipal))
                    {
                        Write-Host -Foreground Green "Exchange Server at $($uri.Host) has App Only Permissions"
                    }
                    else
                    {
                        Write-Warning "Exchange Server at $($uri.Host) does not have App Only Permissions"
                        $isValidAppPrincipal = $false;
                        $anyWarnings = $true
                    }

                    if($isValidAppPrincipal)
                    {
                        $trustedIssuerHosts += $uri.Host
                    }
                }
                else
                {
                    Write-Warning "Unable to get App Principal for $($uri.Host). Unable to check permissions for this Exchange Server"
                    $anyWarnings = $true
                }
            }
            else
            {
                Write-Warning "Found trusted Exchange Server at $($uri.Host) but it is not a Self Issuer"
                $anyWarnings = $true
            }
        }
    }
    if(-not $foundTrustedIssuer)
    {
        Write-Warning "Unable to find any trusted Exchange Servers"
        $anyWarnings = $true
    }
}
else
{
    Write-Warning "Unable to find any trusted Exchange Servers"
    $anyWarnings = $true
}
Write-Host
Write-Host
Write-Host "Step 4: Report current Site Mailbox Configuration"
if($webapps -ne $NULL)
{
    foreach($webapp in $webapps)
    {
        Write-Host
        Write-Host "Web Application Site Mailbox Configuration: $($webapp.Url)"
        Write-Host "Exchange Site Mailbox Domain: $($webapp.Properties["ExchangeTeamMailboxDomain"])"

        if($webapp.Properties["ExchangeAutodiscoverDomain"] -ne $NULL)
        {
            Write-Host "Exchange Autodiscover Domain: $($webapp.Properties["ExchangeAutodiscoverDomain"])"
        }
    }
}
Write-Host
Write-Host "Trusted Exchange Services: $([String]::Join(", ", $trustedIssuerHosts))"
$feature = Get-SPFeature CollaborationMailboxFarm -Farm -ErrorAction Ignore
if($feature -eq $NULL)
{
    Write-Host -ForegroundColor Red "Site Mailboxes are NOT enabled for Farm"
}
else
{
    Write-Host -ForegroundColor Green "Site Mailboxes are enabled for Farm"
}
if($ReturnWarningState)
{
    return $anyWarnings
}

將兩個 two .ps1 檔案儲存在 SharePoint Server 前端上的相同資料夾中,因為其中一個指令碼在執行時會呼叫另一個指令碼。在 Microsoft PowerShell 視窗 (在 PowerShell 圖示按一下滑鼠右鍵,然後選擇 [以系統管理員身分執行]**** 來開啟),瀏覽至包含 .ps1 檔案的資料夾,然後執行 Set-SiteMailboxConfig.ps1 指令碼。這可讓使用者執行下列作業:Save the two .ps1 files to the same folder on a MOSS_2nd_NoVer Front-end or Application server, as one script calls the other during execution. In a PowerShell_1st_NoVer window (right-click the PowerShell icon and choose Run As Administrator to open), navigate to the folder containing the .ps1 files and run the Set-SiteMailboxConfig.ps1 script. This allows users to do the following:

  • 擷取並安裝 Exchange 中繼資料,提供 Exchange 服務主體對 SharePoint 網站訂閱的完全控制權限Retrieve and install the Exchange metadata, giving the Exchange service principal full control permissions to the SharePoint site subscription

  • 啟用在 SharePoint 環境中的網站信箱功能Enable the site mailbox feature in the SharePoint environment

  • (選用) 如果未設定自動探索的網域 DNS,則設定 Exchange 網站信箱目標網域(optional) Set the Exchange site mailbox target domain, if DNS for the domain hasn't been configured for AutoDiscover

Check-SiteMailboxConfig.ps1 會在 Set-SiteMailboxConfig 指令碼當中呼叫,且它會確認設定成功 (也可個別執行)。The Check-SiteMailboxConfig.ps1 is called as part of the Set-SiteMailboxConfig script, and it confirms that the configuration has been successful (it can also be run separately).

格式應如下所示:The format should be as follows:

.\Set-SiteMailboxConfig.ps1 -ExchangeSiteMailboxDomain <網域> -ExchangeAutodiscoverDomain [Exchange Server] -WebApplicationUrl [URL].\Set-SiteMailboxConfig.ps1 -ExchangeSiteMailboxDomain <Domain> -ExchangeAutodiscoverDomain [Exchange Server] -WebApplicationUrl [URL]

其中 <網域> 為 Exchange Server 所在網域的 FQDN,<Exchange Server> 為要連線的 Exchange Server。這是必要參數。Where <Domain> equals the FQDN of the domain your Exchange Server is in, and <Exchange Server> is the Exchange Server that you intend to connect to. This is a required parameter.

選用的參數為 [Exchange Server],這是您要連線的 Exchange Server (在未啟用或適當設定自動探索時需要此項) 和 [URL],這是您可能在設定的特定 URL (通常用於具有 SSL 及非 SSL Web 應用程式的環境)。Optional parameters are [Exchange Server], which is the Exchange Server you intend to connect to (this is needed if Autodiscover is not enabled or properly configured) and [URL], which would be a specific URL that you may be configuring (typically used in an environment with SSL and non-SSL web applications).

範例:Example:

.\Set-SiteMailboxConfig.ps1 -ExchangeSiteMailboxDomain tailspintoys.com -ExchangeAutodiscoverDomain exchange1.tailspintoys.com -WebApplicationUrl https://tailspintoys.com.\Set-SiteMailboxConfig.ps1 -ExchangeSiteMailboxDomain tailspintoys.com -ExchangeAutodiscoverDomain exchange1.tailspintoys.com -WebApplicationUrl https://tailspintoys.com

若執行指令碼時發生錯誤,請參考本文章的<疑難排解>一節尋求指引。If you encounter an error while running the script, refer to the "Troubleshooting" section in this article for guidance.

設定網站信箱的 Exchange ServerConfigure Exchange Server for Site Mailboxes

最後一個步驟是在 Exchange Server 上建立 OAuth 信任及服務權限。The final step is to establish OAuth trust, and service permissions, on the Exchange server.

在 Exchange 上建立 OAuth 信任及服務權限Establish OAuth Trust and Service Permission on Exchange

  1. 在 Exchange Server 上以系統管理員身分開啟 Exchange Management PowerShell 視窗,然後變更至 "C:\Program Files\Microsoft\Exchange Server\V15\Scripts" 目錄。On your instance of Exchange Server open the Exchange Management PowerShell window as Administrator and change to the "C:\Program Files\Microsoft\Exchange Server\V15\Scripts" directory .

  2. 執行下列命令:Run the following command:

    .\Configure-EnterprisePartnerApplication.ps1 -ApplicationType Sharepoint -AuthMetadataUrl https://<SP_FQDN>/_layouts/15/metadata/json/1
    

    其中 <SP_FQDN> 為要設定之 SharePoint SSL 根網站集合的 URL。Where <SP_FQDN> is the URL to the SharePoint SSL root site collection that you want to configure.

疑難排解Troubleshooting

若發生問題,請檢閱下列表格。Please review the following table if you encounter issues.

當您執行設定檢查清單指令碼時供參考的錯誤碼表格Table of error codes for reference when you run a configuration checklist script

錯誤碼Error Code 錯誤Error 附註Notes
0{0}
NoErrorNoError
檢閱必要條件。Review Prerequisites.
1(1)
ExchangeClientNotAvailableExchangeClientNotAvailable
在 SharePoint WFE 上找不到 EWS 用戶端。請執行檢查指令碼並確認項目正確地位於 GAC 中;您可能需要重新安裝 EWS 用戶端。EWS client was not found on the SharePoint WFE. Run the Check script and ensure the entries are properly in the GAC; you may need to reinstall the EWS client.
22.
UnsupportedVersionUnsupportedVersion
EWS 用戶端版本與 SharePoint 不相容。請執行檢查指令碼,確認版本符合最低需求。或者,Exchange Server 可能是 2010 或更早的版本。EWS client version is incompatible with SharePoint. Run the Check script to ensure the version meets minimum requirements. Alternatively, the Exchange server may be 2010 or earlier.
33.
InvalidUserInvalidUser
TeamMailboxDomain 參數不是有效的 FQDN 或 SMTP 位址。The TeamMailboxDomain parameter is not a valid FQDN or SMTP address.
44.
UnauthorizedUserUnauthorizedUser
指令碼從 Exchange Server 收到 401 錯誤訊息,請檢閱 Exchange 設定步驟。The script received a 401 from the Exchange Server, review the Exchange setup steps.
55.
ServerBusyServerBusy
Exchange 在自動探索期間逾時。這應該是間歇性發生的問題,請重試。但若持續發生,請詢問 Exchange 系統管理員。Exchange timed out during AutoDiscovery. It should be intermittent, please retry, but if it is persistent, follow-up with the Exchange Administrator.
66.
URLNotAvailableURLNotAvailable
自動探索無法傳回 ECP/OWA 的 URL,這通常表示 EWS 用戶端版本與 SharePoint 不相容。也可能表示 Exchange 未啟用網站信箱,這就必須進一步詢問 Exchange 系統管理員。AutoDiscovery failed to return a URL for ECP/OWA, which means typically that the EWS client version is incompatible with SharePoint. It may also mean Site Mailboxes are not enabled on Exchange, which would require follow-up with the Exchange Administrator.
77.
OAuthNotSupportedOAuthNotSupported
代表 SharePoint 產生 OAuth 權杖時失敗。這通常是 SharePoint Web 應用程式停用宣告式驗證造成的。Unsuccessful in generating an OAuth token on behalf of SharePoint. This is typically caused by claims-based authentication being disabled on the SharePoint web application.
88.
OAuthExceptionOAuthException
SharePoint 和 Exchange 之間的 OAuth 交握期間發生錯誤。這通常是伺服器對伺服器的設定問題所造成,例如任一方領域值不符、Exchange 或 SharePoint 的憑證問題等。請檢閱憑證,然後嘗試建立或重新建立信任。An error occurred during the OAuth handshake between SharePoint and Exchange. This is typically caused by server to server configuration issues, such as a realm value mismatch on either side, certificate issues for Exchange or SharePoint, etc. Review certificates and attempt to establish or reestablish trust.
99.
InvalidAutodiscoverDomainInvalidAutodiscoverDomain
自動探索網域屬性未設為有效的 FQDN。The AutoDiscover domain property is not set to a valid FQDN.
1010.
UnknownErrorUnknownError
發生不明錯誤狀況。請執行檢查指令碼,並確認有效、受信任的 SharePoint 執行個體可用、檢閱必要條件、向 Exchange 系統管理員確認自動探索已正確設定。An unknown error condition has occurred. Run the Check script and confirm that a valid, trusted instance of SharePoint is available, review prerequisites, confirm AutoDiscover has been set-up properly with the Exchange Administrator.
101101 kbps
OAuthNotSupportedOverHttpOAuthNotSupportedOverHttp
系統若擲回此錯誤、Web 應用程式的預設區域未設為 SSL 且 AllowOauthoverHttp 也設為 False。請執行檢查指令碼,確認任何要代管網站信箱的 Web 應用程式在預設區域都已使用 SSL 進行設定,如必要條件中所概述一般。If this error is thrown, your web application's default zone is not set to SSL, and AllowOauthoverHttp is also set to false. Run the Check script to ensure that any web application you intend to host site mailboxes are set with SSL in the default zone, as outlined in the prerequisites.
102102 kbps
AssociatedOwnersGroupNullAssociatedOwnersGroupNull
網站的預設「擁有人」和「成員」群組其中之一或兩者皆已刪除。對於使用者要安裝網站信箱的任何網站,都需要存在這兩個預設群組。網站管理員應可指示網站擁有人重新建立這些必要的群組。One or both of the default Owners and Members groups for the site have been deleted. Each of these two default groups are required to exist on any site where users install site mailboxes. A site administrator should be able to direct a site owner to recreated these required groups.
103103 ms.
ExchangeTeamMailboxDomainNotSetExchangeTeamMailboxDomainNotSet
未設定 ExchangeTeamMailboxDomain 屬性。The ExchangeTeamMailboxDomain property has not been set.
104104 GB
ExchangeAppPrincipalNotFoundExchangeAppPrincipalNotFound
找不到信任的 Exchange 應用程式主體。這通常表示遺漏 New-SPTrustedSecureTokenService 步驟。請執行檢查指令碼,確認輸出的應用程式主體 URL 是正確的。No Exchange app principals were found to be trusted. Typically, this means the New-SPTrustedSecureTokenService step was missed. Run the Check script and ensure that the app principal URL(s) outputted are the correct one(s).
105105
ExchangeAppPrincipalMissingPermissionsExchangeAppPrincipalMissingPermissions
連線的 Exchange 應用程式主體在 SharePoint 伺服器陣列上沒有適當的權限。請執行檢查指令碼,確認 Exchange 應用程式主體在伺服器陣列上具備必要權限。The Exchange app principal being connected to doesn't have the right permissions on the SharePoint farm. Run the Check script and ensure that the Exchange app principal has the required permissions on the farm.

另請參閱See also

概念Concepts

Plan email integration for a SharePoint Server farmPlan email integration for a SharePoint Server farm

Configure email integration for a SharePoint Server farmConfigure email integration for a SharePoint Server farm

其他資源Other Resources

站台信箱Site mailboxes

共同作業Collaboration