部署 sharepoint Business Connectivity Services 混合式解決方案Deploy a Business Connectivity Services hybrid solution in SharePoint

摘要:了解如何設定 Business Connectivity Services (BCS) 混合式案例,以透過 SharePoint Online 存取內部資料。Summary: Learn how to configure the Business Connectivity Services (BCS) hybrid scenario to access on-premises data through SharePoint Online.

* * 本文是藍圖的用於設定 SharePoint 混合式解決方案的程序的一部分。請確定您是遵循程當您執行本文中的程序。This article is part of a roadmap of procedures for configuring SharePoint hybrid solutions. Be sure you're following a roadmap when you do the procedures in this article. **

Microsoft Business Connectivity Services (BCS) 混合部署案例可讓您在 SharePoint Online 中的 sharepoint 安全地發佈至外部清單或應用程式的內部部署資料。如此,使用者可以檢視及編輯資料,視所擁有的權限而定。The Microsoft Business Connectivity Services (BCS) hybrid deployment scenario allows you to securely publish on-premises data to an external list or app for SharePoint in SharePoint Online. From there, users can view and edit the data, depending on the permissions that they have.

在此案例中,您將了解如何:In this scenario, you will learn how to:

  • 設定您的內部部署環境,以便可以安全地將機密的業務資料發佈至 SharePoint Online 租用。Configure your on-premises environment so that you can securely publish confidential business data to your SharePoint Online tenancy.

  • 建立及使用 Visual Studio 2012 設定 OData 服務端點和外部內容類型。Create and configure an OData service endpoint and an external content type with Visual Studio 2012.

  • 準備您的 SharePoint Online 租用來管理 SharePoint 或讓外部網路使用者可以使用外部資料的外部清單的裝載的應用程式。Prepare your SharePoint Online tenancy to host an app for SharePoint or an external list, which makes the external data available to your extranet users.

  • 建立 SharePoint Online 中如何連線至內部部署 OData 服務端點告訴 Business Connectivity Services 連線設定物件。Create a connection settings object that tells Business Connectivity Services in SharePoint Online how to connect to the on-premises OData service endpoint.

  • 為 SharePoint 或 SharePoint online 的外部清單部署應用程式。Deploy an app for SharePoint or external list to SharePoint Online.

  • 驗證及疑難排解 BCS 混合式案例。Validate and troubleshoot the BCS hybrid scenario.

這些程序的功能What these procedures help you deploy

BCS 為 SharePoint Server、 Office 2016 和 SharePoint Online 可讓您將無法在 SharePoint 產品中的資料整合或 Office 2016 到 SharePoint Server 中的集中式基礎結構。BCS 實作讓許多表單。這包括此混合使用表單的 SharePoint Online 和 SharePoint Server 的內部。這些程序說明如何安裝及設定 BCS 將資料從內部部署 OData 服務端點整合 SharePoint Online。針對此案例,我們使用 AdventureWorks 範例 SQL 資料庫並建立資料庫的 OData 服務標題。解決方案看起來如下圖所示。BCS is a centralized infrastructure in SharePoint Server, Office 2016, and SharePoint Online that enables you to integrate data that is not in SharePoint products or Office 2016 into SharePoint Server. BCS implementations take many forms. This includes this hybrid form that uses SharePoint Online and SharePoint Server on-premises. These procedures show how to install and configure BCS to integrate data from an on-premises OData service endpoint into SharePoint Online. For this scenario, we use the AdventureWorks sample SQL database and create an OData service head for the database. The solution looks as shown in the following diagram.

圖: 混合式 BCS 解決方案Figure: Hybrid BCS solution

顯示適用於 BCS 混合的動作序列

  1. 資訊工作者使用同盟的帳戶登入至 SharePoint Online 和 SharePoint 或需要從內部部署 OData 資料來源資料的外部清單的開啟應用程式。An information worker logs on to SharePoint Online by using their federated account and opens an app for SharePoint or external list that needs data from an on-premises OData data source.

  2. 外部清單建立資料要求,並傳送給 Business Connectivity Services。Business Connectivity Services 會查看如何連線到資料來源以及要使用的認證連線設定物件。The external list creates a request for the data and sends it to Business Connectivity Services. Business Connectivity Services looks at the connection settings object to see how to connect to the data source and which credentials to use.

  3. Business Connectivity Services 會擷取兩組認證:Business Connectivity Services retrieves two sets of credentials:

  4. 從 SharePoint Online 中的安全認證儲存安全通道憑證。這用於反向 proxy 的 SharePoint Online 驗證。The Secure Channel certificate from Secure Store in SharePoint Online. This is used for SharePoint Online authentication to the reverse proxy.

  5. 從 Azure AD 服務OAuth權杖。這用於至 SharePoint 伺服器陣列的使用者驗證。您的 SharePoint Online 訂閱入侵 Azure AD 服務的權限。它是管理使用者的 SharePoint Online 的安全性權杖的安全性權杖服務。An OAuth token from the Azure AD Service. This is used for user authentication to the SharePoint Server farm. You gain access to the Azure AD service with your SharePoint Online subscription. It is a security token service that manages security tokens for users of SharePoint Online.

  6. Business Connectivity Services 將 HTTPS 要求傳送至資料來源的已發佈端點。要求包含來自 Secure Store、 OAuth 權杖,並要求資料的用戶端憑證。反向 proxy 所使用的用戶端憑證驗證要求,並將它轉送至內部部署 SharePoint 伺服器陣列。如需發佈至網際網路的 SharePoint 的詳細資訊,請參閱 Forefront 技術文件庫中的SharePoint 發佈解決方案指南 》Business Connectivity Services sends an HTTPS request to the published endpoint for the data source. The request includes the client certificate from Secure Store, the OAuth token, and a request for the data. The reverse proxy authenticates the request by using the client certificate and forwards it to the on-premises SharePoint Server farm. For more information about publishing SharePoint to the Internet, see SharePoint publishing solution guide in the Forefront Technical Library.

  7. 內部部署伺服器陣列擷取 OAuth 權杖 (例如 user123@contoso.com) 從使用者的雲端身分識別並透過用戶端物件模型 (CSOM) 程式碼將其對應的內部部署身分識別 (例如 contoso\user123)。內部部署認證會對應至可透過 Secure Store 目標應用程式的外部資料存取認證。The on-premises farm retrieves the user's cloud identity from the OAuth token (for example, user123@contoso.com), and through the Client Side Object Model (CSOM) code, maps it to the on-premises identity (for example, contoso\user123). The on-premises credentials are mapped to credentials that have access to the external data via a Secure Store target application.

  8. 內部部署 Business Connectivity Services 轉寄到 OData 服務端點的要求。OData 服務的驗證方法 (透過 IIS) 的要求,並傳回通過回鏈結能夠處理使用者的外部清單的資料。The on-premises Business Connectivity Services forwards the request to the OData Service endpoint. The OData Service authenticates the request (via IIS) and returns the data, which is passed back through the chain to the external list for the user to work with.

影片: 觀賞 BCS 混合式案例的示範Video: Watch a demonstration of the BCS hybrid scenario

較小的程序會列出全面部署此案例中的步驟。每項程序被編號指出整體順序其位置。開頭和結尾的每項程序,連結指向您的舊版和下列步驟。下列清單包含所有必要的順序,供您參考中的程序的連結。請注意這份清單包含 sharepoint 部署的外部清單和應用程式的步驟。您可以部署一個或其他或兩者,視您的需求而定。您應該略過您不想要部署無論設定的步驟。您必須遵循這些中建立的分析藍本的順序。您也可以針對您自己的唯一案例個別使用這些程序。當您組合個別的程序來建立您自己的情況時,務必您的順序,在實驗室前設定嘗試在生產環境中測試一組完整的程序。The steps to completely deploy this scenario are presented in smaller procedures. Each procedure is numbered indicating its position in the overall sequence. At the beginning and end of each procedure, links direct you to the previous and following steps. The following list contains links to all of the procedures, in the required order, for your reference. Be aware that this list includes the steps to deploy an external list and an app for SharePoint. You can deploy one or the other or both, depending on your needs. You should skip the steps for whichever configuration you don't want to deploy. You must follow them in sequence to build out the scenario. You can also use these procedures individually for your own unique scenarios. When you assemble individual procedures to build out your own scenarios, it is important that you test the complete set of procedures, in order, in a lab setting before you try them in production.

程序的藍圖Roadmap of the procedures

若要設定 BCS 混合式解決方案:To configure the BCS hybrid solution:

  1. 請遵循設定基礎的設定和服務所需的準備 Business Connectivity Services 混合式案例的適用環境中的程序。Follow the procedures in Prepare your environment for the Business Connectivity Services hybrid scenario to configure the underlying settings and services needed.

  2. 如果您想要使用的外部清單,請遵循 < Deploy 為外部清單的 Business Connectivity Services 混合式案例中的程序。If you want to use an external list, follow the procedures in Deploy the Business Connectivity Services hybrid scenario as an external list.

  3. 請遵循驗證 Business Connectivity Services 混合式案例來驗證您的安裝程式中的程序。Follow the procedures in Validate the Business Connectivity Services hybrid scenario to validate your setup.

另請參閱See also

概念Concepts

SharePoint Server 的混合Hybrid for SharePoint Server

規劃混合式 SharePoint ServerPlan SharePoint Server hybrid

安裝及設定混合式 SharePoint ServerInstall and configure SharePoint Server hybrid

其他資源Other Resources

取得 Web、 雲端、 行動裝置及其他推出 OData: 資料存取Introducing OData: Data Access for the Web, the cloud, mobile devices, and more