Plan and Configure Business Connectivity Services

Business Connectivity Services (BCS) solutions are custom solutions that integrate with SharePoint Server (as well as SharePoint Online). Developing a BCS solution requires both deep business application knowledge (such as what types of entities need to be managed), as well as development experience with Visual Studio and SharePoint Designer or the Microsoft Office Developer Tools.

BCS can be used in a number of scenarios, such as the following:

  • Retrieving and presenting external data from enterprise applications or web services
  • Enabling offline use of external data
  • Connecting structured data from enterprise applications with unstructured data such as documents and images
  • Building applications to update and interact with data in enterprise or external applications

While building external applications that leverage BCS is outside the scope of the MS-300 exam, it's important to know what the capabilities of the system are and how to set it up. Additionally, for scenarios that only require reading data, a data gateway to connect to the Power Platform may also be a suitable solution. You'll learn more about data gateways in Chapter 13, Implement a Data Gateway.

In this chapter, we'll cover the following topics:

  • Overview of Business Connectivity Services
  • Overview of Secure Store
  • Planning for external content types
  • Planning and configuring connections to external data sources
  • Planning and configuring search for BCS applications

By the end of this chapter, you'll have an understanding of basic BCS concepts.

Let's go!

Overview of Business Connectivity Services

As mentioned previously, the purpose of BCS is to provide a mechanism to retrieve and manipulate data stored in external business applications or systems. BCS can be used to embed remote datasets in your own applications, giving users a familiar interface to manipulate or view data.

For example, if you are a reseller of restaurant supplies, you may want to connect to the manufacturer or other wholesale distributors and import their data catalogs into custom applications that your employees use to quote and resell equipment to end customers. Using BCS, you can create connections to your suppliers' applications and render that data in your own applications.

Depending on the data source and external data configuration you need, Business Connectivity Services can be used to support CRUDQ operations (create, read, update, delete, query).

Overview of Secure Store

Secure Store can be thought of as a type of credential vault for SharePoint. You can store credentials for authenticating into external applications. Credentials are stored in a configuration item called a target application.

Before the Secure Store service can be used, however, you'll need to prepare it to be able to store and encrypt credentials.

To prepare a Secure Store, follow these steps:

  1. Launch Central Administration.
  2. Select Application Management, and then select Manage service applications.
  3. Select Secure Storeand then click Manage from the ribbon:

  1. The first time you manage the Secure Store service application, you'll be prompted to generate a key, as shown in the following screenshot:

  1. On the ribbon, in the Key Managementgroup, click Generate New Key.
  2. Enter a passphrase to encrypt the database. Record the passphrase in a safe place, as it will be not possible to retrieve it in the future. ClickOK:

Once the key has been generated, the Secure Store service application is ready to use.

Next, we'll look at external content types and how they relate to Business Connectivity Services.

Planning for external content types

Business Connectivity Services utilizes external content types. Similar to normal content types (which can be metadata columns, properties, and workflows that are applied to a piece of data), an external content type allows you to apply those same concepts to external data. External content types allow the reuse of metadata and actions on external data sources.

External content types can be used to create and represent external data as the following types of objects:

  • External lists: External lists are the most common type of object in BCS solutions. External lists use an external content type as their source, allowing you to create a SharePoint list populated with external data. External lists function just like any other SharePoint list, providing a familiar interface to interact with data. External lists, depending on the connected system, may allow you to write back to the source. If configured, users can make changes to content in the external list, which will get synchronized back to the external data source.
  • External data columns: Similar to external lists, external data columns allow users to link external data columns to existing SharePoint lists.
  • Business data web parts: In addition to using building blocks such as external lists and data columns, you can also use web parts, such as Business Data List, Business Data Item, Business Data Related List, and Business Data Actions.
  • External content type picker: The external content type picker can be embedded in pages or forms to give users a way to choose data items from an external data source.
  • External item picker: Similar to the external content type picker, the external item picker is used to provide the external data picking capability from within a custom app.
  • Profile pages: A profile page displays the details and properties of an external item.
  • Custom pages: Here, you can use the SharePoint object model, client object model, and REST interface to programmatically access external data.

Knowing how the external content will be used is required if you want to successfully choose the appropriate content types.

After selecting what data you'll use and how you'll use it, you can select the external content type that meets those requirements. Then, you can begin configuring BCS accordingly, as we'll see in the next section.

Planning and configuring connections to external data sources

Once your organization has decided on what external data sources to interact with, you can work with your partners, suppliers, vendors, or customers to create a connection to their data source.

When connecting to external applications or data sources, you'll need to work with the provider of the application or data source to obtain some sort of credential, as well as any other special configurations that are necessary to successfully configure the relationship. In this example, we're going to configure Business Connectivity Services to connect to Salesforce to give you an idea of how these components work together.

As a prerequisite, you'll need to configure a Salesforce-connected app. Configure OAuth settings and grant the API permissions to access and manage data. Record the consumer key and the consumer secret.

Note: This is outside the scope of the MS-301 exam. For information on configuring Salesforce, please see the Salesforce developer documentation.

In the next few sections, we'll configure a Secure Store target application, which will allow BCS to authenticate to the external data source. Then, we'll configure BCS so that it can connect to an external data source.

Configuring Secure Store target applications

Before we can configure connectivity to an external application, we need to configure the Secure Store service application so that it can host credentials. Without a secure store, BCS will have no way to log into the remote data source.

To configure Secure Store, follow these steps:

  1. Launch Central Administration, navigate to Application Management, select Manage service applications, and then select the Secure Store service application.
  2. On the ribbon, in the Manage Target Applications group, select New:

  1. Enter a Target Application ID and a Display Name, as well as a contact email address for the user or group who will be responsible for administering or maintaining this credential. As per our application configuration, we're going to select a target application type of Group, but your application's requirements may differ. When finished, click Next:

  1. Enter the types of credential fields that will be provided to the external application. For this particular application, we'll select Username and Password, but the configuration will depend on the requirements of the remote application. Click Next:

  1. Configure the administrators and users of the target application and click OK:

  1. After the target application has been created, select it from the list and click Setin the Credentialsgroup of the ribbon:

  1. You'll need to follow your external application's configuration requirements here. In this example, we're providing a credential to the Salesforce instance:

  1. As per our connected data source's instructions, we need to repeat this process again, only this time, we're going to store the Consumer Key and Consumer Secret objects:

The target application credentials have been saved. Next, using the tools provided by the sample application, we'll import a sample data model.

Importing the BCS model

Data is represented in BCS through a data model. The data model file is formatted as an XML, with nodes and elements related to the remote data structure. An example data model file is shown in the following screenshot:

To import a model into BCS, follow these steps:

  1. Launch Central Administration, select Application Management, select Manage service applications, and then click Business Connectivity Services.
  2. In the Permissions group of the ribbon, select Set Metadata Store Permissionsand add your account. Select the permissions you want to use and click OK.
  3. On the ribbon, click Import:

  1. Browse to the file you wish to import and select the type. In this example, we're importing a model file. Click Import:

Once the BDC model has been imported, you can begin creating external lists.

Configuring external lists

External lists will allow users or applications to query or otherwise manipulate the data represented by the BDC model. External lists and content types can be defined with SharePoint Designer. To configure an external list, follow these steps:

  1. Navigate to a SharePoint site and select Site Contents.
  2. Click New | App.
  3. Select External List.
  1. Fill out the properties of the external list. You'll need to give it a name and then select a source external content type. In this case, we're selecting an entity that we imported from a Business Connectivity Services model file. Click Create:

  1. Refresh the Site Contents page, and then click on the newly created list. Note that the item has an External list displayed in the Type column:

  1. Verify the contents to make sure it has retrieved the external data:

With that, the external list's configuration has been successfully completed.

Planning and configuring search for BCS applications

Since an external list functions like any other SharePoint content list, it can be indexed and searched. The content isn't available to search by default, however, so it must be added as a content source. Once you've added the BCS data as a content source and crawled the BCS content, you will be able to search for it.

To configure search for Business Connectivity Services data, follow these steps:

  1. Launch Central Administration, select Application Management, select Manage service applications, and then click Search.
  2. Under Crawling, click Content Sources.
  3. On the Manage Content Sources page, click New Content Source:

  1. Enter a name for the content source and select Line of Business Data as Content Source Type. Select a Business Data Connectivity Service Application and then select a data source. Click OK when you're finished:

  1. Right-click the data source and start a full crawl.

After you've done this, you can search for content that has been indexed from the external list. The availability of the content to be crawled will depend on the data source and the model file you imported earlier.

Summary

In this chapter, we covered Business Connectivity Services and Secure Store, and how they interact. Business Connectivity Services can be used to render remote datasets in the local SharePoint system, making it available for queries or to custom applications. Depending on the remote data, BCS can also support data modification, delete, and query operations. You learned how Secure Store, credential storage, and management services can be used by Business Connectivity Services when connecting to remote data sources. Finally, we walked through some sample configurations with both BCS and Secure Store.

In the next chapter, we'll cover managed metadata concepts and see how metadata can be used to improve the discoverability of data.

Questions

Use the following questions to test your knowledge of this chapter. You can find the answers in Chapter 16, Assessment Answers:

  1. You manage a SharePoint farm. You are working with developers to connect to a supplier's database and import content. What should you configure?
    1. Business Continuity Services
    2. Business Connectivity Services
    3. Remote Procedure Call
    4. Remote SharePoint Provisioning
  2. You are planning to use Business Connectivity Services to connect to an authenticated external data source. What should you plan on configuring?
    1. Security Token Service
    2. Secure Store
    3. Managed Security
    4. Managed Account
  3. You are working with a developer on a Business Connectivity Services solution. You are planning on using external data inside a custom app. Which external content type is best suited for this?
    1. External lists
    2. External data columns
    3. External content type picker
    4. External item picker
  1. You are planning to develop a custom solution for SharePoint that utilizes external data sources. What two applications would be the most useful?
    1. Visual Studio
    2. Microsoft Forms
    3. SharePoint Designer
    4. Microsoft SQL
  2. You are planning on creating an external list in a SharePoint site. Before configuring this list, what should you do?
    1. Import a Business Connectivity Services data model file
    2. Configure content crawling
    3. Create a User Profile service application
    4. Create a web part app in Visual Studio
  3. You plan on integrating external data into an application. What operations does Business Connectivity Services support?
    1. RQ
    2. CRU
    3. CRUD
    4. CRUDQ
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset