SharePoint Online connector package

SharePoint Online connector packageedit

If you do not need the flexibility provided by a connector package, you may prefer the SharePoint Online connector included with your Elastic deployment.

The connector framework is a tech preview feature. Tech preview features are subject to change and are not covered by the support SLA of generally available (GA) features. Elastic plans to promote this feature to GA in a future release.

SharePoint Online by Microsoft is a cloud-based collaboration, knowledge management and storage platform for organizations of all sizes. Often used as a centralized content management system (CMS), SharePoint Online stores a wealth of information across departments and teams. Use the Elastic Enterprise Search SharePoint Online connector package to deploy and run a SharePoint Online connector on your own infrastructure. After registering your connector package, Workplace Search automatically captures, syncs, and indexes the following items from your SharePoint Online:

Stored Files

Including ID, File Metadata, File Content, Updated by, and timestamps

Known issuesedit

  1. When configured after November 8, 2020, the Sharepoint Online connector must utilize an application set up by an Azure AD admin, with granted Admin Consent. Therefore, private sources are not supported. Organization sources are supported when connected by an Azure AD admin user, or when the Admin Consent or Admin Consent Workflows are enabled. Refer to the official Microsoft documentation for an overview of User and Admin consent.

    During configuration, you register an OAuth app in Azure AD that does not have a verified publisher. After November 8, 2020, these apps can be connected by Azure AD admin users only.

Deploying and running the connectoredit

Visit the Elastic connectors repository (8.3 branch). Use the documentation within that repository to deploy and run the connector on your own infrastructure.

During that process you will create an API key.

Record the API key and the deployed connector’s URL. You will need this information in a future step: Entering the connector information within Kibana.

Configuring the SharePoint Online Connectoredit

Configuring the SharePoint Online connector is the next step prior to connecting the SharePoint Online service to Workplace Search, and requires that you create an OAuth App from the SharePoint Online platform. To get started, first log in to SharePoint Online and access your administrative dashboard:


Step 1. Sign in to https://portal.azure.com/ and click on Azure Active Directory:

Figure 101. Connecting SharePoint

Step 2. Locate App Registrations:

Figure 102. Connecting SharePoint

Step 3. Click New Registration:

Figure 103. Connecting SharePoint

Step 4. Give your app a name - like "Workplace Search" - and make it multitenant.

Setting the app to single tenant will result in a degraded experience, and the connector will not sync content.

Leave the Redirect URIs blank for now. We’ll add this later in the process.


Step 5. Register the application:

Figure 104. Connecting SharePoint

Step 6. Record the Client ID.

You will need this in a future step: Entering the OAuth client information within Kibana.


Step 7. Next, click the Add a Redirect URI link in the header.

Use the Workplace Search OAuth redirect URL for your deployment.

Figure 105. Connecting SharePoint

Step 7. Save the cofiguration.

Figure 106. Connecting SharePoint

Step 8. Locate the Client Secret by navigating to Certificates & Secrets:

Figure 107. Connecting SharePoint

Step 9. Pick a name for your client secret (for example, Workplace Search). Select 24 months as the expiration date:

Figure 108. Connecting SharePoint

Step 10. Record the Client Secret value before leaving this screen.

Figure 109. Connecting SharePoint

You will need this in a future step: Entering the OAuth client information within Kibana.


Step 11. We must now set up the permissions the Application will request from the Admin. Navigate to API Permissions and click Add Permission. Add delegated permissions until the list resembles the following:

User.ReadBasic.All
Group.Read.All
Directory.AccessAsUser.All
Files.Read
Files.Read.All
Sites.Read.All
offline_access
Figure 110. Connecting SharePoint

Step 12. Finally, Grant admin consent.

Use the Grant Admin Consent link from the permissions screen.

Next, return to Kibana to enter the connector and OAuth client information.

Entering the connector information within Kibanaedit

If you started this process within Kibana, return to Kibana to enter the connector and OAuth client information. Alternatively, if you started from this document, open Kibana now.

  1. Navigate to SearchEnterprise SearchWorkplace SearchSourcesAdd SourceSharePoint Online.
  2. Choose Configure SharePoint Online.
  3. Locate Connector Package and choose Instructions.
  4. Enter the values you previously recorded within the fields Connector URL and Connector API key.
  5. Choose Save configuration.

Entering the OAuth client information within Kibanaedit

Continuing from above, you must now enter the OAuth client information within Kibana.

  1. Enter the values you previously recorded within the fields Client Id and Client secret.
  2. Choose Save configuration.

Voilà! The SharePoint Online connector is now configured, and ready to be used to synchronize content. In order to capture data, you must now connect a SharePoint Online instance with the adequate authentication credentials.

Connecting SharePoint Online to Workplace Searchedit

Once the SharePoint Online connector has been configured, you may connect a SharePoint Online instance to your organization.


Step 1. Head to your organization’s Workplace Search administrative dashboard, and locate the Sources tab.


Step 2. Click Add a new source.


Step 3. Select SharePoint Online in the Configured Sources list, and follow the SharePoint Online authentication flow as presented.


Step 4. Upon the successful authentication flow, you will be redirected to Workplace Search.

SharePoint Online content will now be captured and will be ready for search gradually as it is synced. Once successfully configured and connected, the SharePoint Online synchronization automatically occurs every 2 hours.

Document-level permissionsedit

You can synchronize document access permissions from SharePoint Online to Workplace Search. This will ensure the right people see the right documents.

See Document-level permissions for Microsoft.

Limiting the content to be indexededit

If you don’t need to index all the available content, you can specify the indexing rules via the API. This will help shorten indexing times and limit the size of the index. See Customizing indexing. For SharePoint Online, applicable rule types would be path_template and file_extension.

Synchronized fieldsedit

The following table lists the fields synchronized from the connected source to Workplace Search. The attributes in the table apply to the default search application, as follows:

  • Display name - The label used when displayed in the UI
  • Field name - The name of the underlying field attribute
  • Faceted filter - whether the field is a faceted filter by default, or can be enabled (see also: Customizing filters)
  • Automatic query refinement preceding phrases - The default list of phrases that must precede a value of this field in a search query in order to automatically trigger query refinement. If "None," a value from this field may trigger refinement regardless of where it is found in the query string. If '', a value from this field must be the first token(s) in the query string. If N.A., automatic query refinement is not available for this field by default. All fields that have a faceted filter (default or configurable) can also be configured for automatic query refinement; see also Update a content source, Get a content source’s automatic query refinement details and Customizing filters.
Display name Field name Faceted filter Automatic query refinement preceding phrases

Id

id

No

N.A.

URL

url

No

N.A.

Title

title

No

N.A.

Type

type

Default

None

Path

path

No

N.A.

Created by

created_by

Configurable

[creator is, created by, edited by, modified by]

Last updated

last_updated

No

N.A.

Updated by

updated_by

Configurable

[edited by, updated by, modified by]

Drive owner

drive_owner

Default

N.A.

Media type

mime_type

Default

None

Extension

extension

Default

None