How to Configure Your Microsoft Search Target

The following topics describe how to create a Microsoft Search Target in Connectivity Hub.

For more information about Targets, see What is a Target?

Prerequisites

See Microsoft Search Engine Prerequisites.

Tip:

Target directory

Make sure to use this target with Azure or Microsoft search directory.

See below details about target directory configuration:

Caution:

Multi-server support

Support for multi-server indexing is not fully implemented in Microsoft Search target. Please use one server for indexing. 

Register the Azure Active Directory Application

  1. Login to Microsoft Azure with the tenant Admin credentials.

  2. Click Azure Active Directory and then App registrations. See the graphic below:



  3. Create a New registration or select an existing registration.

  4. From the Overview page of the application, record the following IDs:
    1. Application (client) ID
    2. Directory (tenant) ID

  5. Navigate to the Certificates & secrets page. See the graphic below.

  6. Click the "New client secret" button to generate a new client secret. Record the client secret .



  7. Click API permissions under Manage in the left-side navigation.

  8. Click Add a Microsoft Graph permission.

  9. Select the Application permissions category.
  10. Add the following permissions
    • ExternalItem.ReadWrite.OwnedBy
    • ExternalConnection.ReadWrite.OwnedBy
  11. Grant admin consent by selecting "Grant admin consent for <tenant>."

Target Configuration

To add the Microsoft SearchTarget, follow these steps:

  1. Go to the Connectivity Hub Target page.

  2. Select New Target.

  3. The Load Target page appears. See below.

  4. Use the drop-down menu to select your Target.



  5. Select the Target Info tab.

  6. Title (required): Enter a name in the Title field.

     

  7. Select the General Settings tab and update the default settings as needed.

  8. Select the Custom Settings tab:
    1. Enter the Client ID recorded from the "Register the Azure Active Directory application" section.
    2. Enter the Client Secret recorded from the "Register the Azure Active Directory application" section.
    3. Enter the Tenant ID recorded from the "Register the Azure Active Directory application" section.
    4. Specify the Authority endpoint.
      1. Optional.
      2. Default: https://login.microsoftonline.com .
      3. For tenants in the Azure Government cloud this value must be changed to https://login.microsoftonline.us.
    5. Specify the Graph endpoint .
      1. Optional.
      2. Default: https://graph.microsoft.com. 
      3. For tenants in the Azure Government cloud this value must be changed to https://graph.microsoft.us.
    6. Specify the Schema Registration Timeout.
      1. Optional.
      2. See Microsoft graph search doc for guidance.

  9. Security tab:
    1. Select "TargetDirectoryAcl' as security model



    2. And on the connection associated to the MS Search content, select Create security groups:

How to Configure Metadata Properties for Graph Search

Currently, Microsoft Graph Search application is in beta.

The options for configuring metadata in MS Graph Search are in flux.

See the following Microsoft resources for guidance:

You must configure your content source metadata to satisfy Microsoft's requirements.

Connectivity Hub Metadata Management page for your content source displays a warning if you exceed the current known limitations.

Note: The MS Search does not allow "_" and "." characters in metadata property names. The Target automatically trims these characters from the property names.

How Index the Content of Your Documents (Full-text) with Microsoft Search

  1. To index the content of your documents (such as PDFs or MS Office documents) with Microsoft Search, you must connect your content source to the BA Insight Tika Text Extractor service.

  2. Follow the instructions on the page: Azure Cognitive Search: How to Extract Plain Text from Documents.

  3. Make sure to mark the property returned by Tika Text Extractor service as Active and Full Text Index:



  4. After you add a Target, run a Full Target Update job.

  5. Then, run an Incremental Target Update job to update your Target.

How to Search for Indexed Items

Set up a Custom Vertical and Display Template (tenant level)

Use the following instructions to set up a custom vertical and display template (tenant level) for displaying indexed ExternalItems .

See Microsoft documentation for more information about creating a custom search vertical.

Note: Site collection level search for ExternalItems is not currently available

  1. Perform a full crawl on the configured MS target.

  2. Go to the modern Admin Center: https://admin.microsoft.com.

  3. Navigate to Settings → Microsoft Search → Connectors
    1. Verify that the Connector was created.
      Note: Connectors that index ExternalFiles do not appear in the list.

  4. Navigate to the Settings →  Microsoft Search →  'Verticals' tab.
    1. Click 'Add a new vertical' and enter a name.
    2. Pick your Connector as the Content Source.
    3. Provide a filter query to narrow the scope of your vertical (optional).
    4. Click 'Add vertical' and be sure to 'Enable' it after you reorder verticals as needed.

  5. Navigate to Settings →  Microsoft Search → Result Types
    1. Click 'Add a new result type'.
    2. Use the card designer to craft your display template.
    3. Copy the JSON file and complete display template creation.

Set Up a SharePoint Site

Use the following instructions to set up a SharePoint site and display ExternalFiles in the 'All" and 'Files' tab:

  1. Create a SharePoint site collection with a modern search page.

  2. Import a SharePoint module in PowerShell using the following command:
       Install-Module -Name Microsoft.Online.SharePoint.PowerShell3

  3. Set up SERP using the below PowerShell script:

Copy
$orgName = Read-Host -prompt 'Enter the name of your organization'

$userName = Read-Host -prompt 'Enter user name'

$userCreds = Get-Credential -UserName $userName -Message "Type the password"Connect-SPOService -Url https://$orgName-admin.sharepoint.com -Credential $userCreds

$url = Read-Host -Prompt 'Please enter the SharePoint site URL'

$site = Get-SPOSite -Identity $url

Set-SPOSite $url -DenyAddAndCustomizePages 0

$pwd = Read-Host -AsSecureString 'type the password'

$context = New-Object Microsoft.SharePoint.Client.ClientContext($url)

$credential = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($userName, $pwd)

$context.Credentials = $credential

$web = $context.Web

$context.Load($web)

$web.AllProperties["AllVerticalContent"] = "Combined"$web.Update()

$context.ExecuteQuery()

$web.AllProperties["FilesVerticalContent"] = "Combined"$web.Update()

$context.ExecuteQuery()

Write-Host "Success" -ForegroundColor Cyan

Read-Host -Prompt 'Press enter to exit'