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.
Target directory
Make sure to use this target with Azure or Microsoft search directory. For more information, see Target Directory Configuration.
Important notes for crawl job behaviors
-
Attempting to stop crawl jobs on content sources that are indexing content in MSSearch Targets before the initialization stage can lead to jobs remaining blocked in the stopping phase.* Try and wait for the crawl to begin before stopping a job.
-
*If you find yourself in this situation, please contact support to perform a quartz service restart and an IIS Reset.
-
-
Any manual modifications to your search schema are overwritten during a crawl job if the default values for the search schema from Connectivity Hub are changed, or the Connectivity Hub search schema is different to the search schema that exists in Microsoft Graph.
-
If the search schema in Connectivity Hub is different than the search schema from Microsoft Graph, any manual changes made to the Microsoft Graph search schema must be re-implemented after a complete crawl.
-
BA Insight does not recommend making manual changes to the Microsoft Graph search schema.
-
Limitations
Note the following limitations when configuring your Microsoft Search target:
-
When creating a content source that uses a Microsoft Search target, The Microsoft Search API does not allow you to remove the value for the Description field after it has been set. For more information, see Target and metadata specific settings to enhance Microsoft Copilot functionality.
Register the Azure Active Directory Application
- Login to Microsoft Azure with the tenant Admin credentials.
- Click Identity>Applications>App registrations.
- Create a New registration or select an existing registration. For more information, see Register an application in the Microsoft documentation
- From the Overview page of the application, record the following IDs:
- Application (client) ID
- Directory (tenant) ID
- Navigate to the Certificates & secrets page.
- Click the New client secret button to generate a new client secret. Record the client secret value
- Click API permissions under Manage in the left-side navigation.
- Click Add a Microsoft Graph permission.
- Select the Application permissions category.
- Add the following permissions
-
- ExternalConnection.ReadWrite.All
- ExternalItem.ReadWrite.All
- User.Read.All
- Group.Read.All
- For more information on adding permissions, see Application permission to Microsoft Graph in the Microsoft documentation.
- Grant admin consent by selecting "Grant admin consent for <tenant>."
Target Configuration
To add the Microsoft Search Target, follow these steps:
- Go to the Connectivity Hub Target page.
- Select New Target.
- The Load Target page appears. See below.
- Use the drop-down menu to select your Target.
- Select the Target Info tab.
- Title (required): Enter a name in the Title field.
- Select the General Settings tab and update the default settings as needed.
- Select the Custom Settings tab:
- Enter the Client ID recorded from the "Register the Azure Active Directory application" section.
- Enter the Client Secret recorded from the "Register the Azure Active Directory application" section.
- Enter the Tenant ID recorded from the "Register the Azure Active Directory application" section.
- Specify the Authority endpoint:
- Optional.
- Default: https://login.microsoftonline.com .
- For tenants in the Azure Government cloud this value must be changed to https://login.microsoftonline.us.
- Specify the Graph endpoint .
- Optional.
- Default: https://graph.microsoft.com
- For tenants in the Azure Government cloud this value must be changed to https://graph.microsoft.us.
- Specify the Schema Registration Timeout.
- Optional.
- See Microsoft graph search doc for guidance.
- Security tab:
- Specify TargetDirectoryAcl as Security model.
- In the connection associated to the MS Search content, on the Security:Directory tab, check Create security groups.
- Specify TargetDirectoryAcl as Security model.
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:
-
https://docs.microsoft.com/en-us/graph/api/resources/externalitem?view=graph-rest-beta:
-
https://docs.microsoft.com/en-us/graph/api/resources/property?view=graph-rest-beta
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 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.
- Perform a full crawl on the configured MS target.
- Go to the modern Admin Center: https://admin.microsoft.com.
- Navigate to Settings → Microsoft Search → Connectors
- Verify that the Connector was created.
- Note: Connectors that index ExternalFiles do not appear in the list.
- Navigate to the Settings → Microsoft Search → 'Verticals' tab.
- Click 'Add a new vertical' and enter a name.
- Pick your Connector as the Content Source.
- Provide a filter query to narrow the scope of your vertical (optional).
- Click 'Add vertical' and be sure to 'Enable' it after you reorder verticals as needed.
- Navigate to Settings → Microsoft Search → Result Types
- Click 'Add a new result type'.
- Use the card designer to craft your display template.
- 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:
- Create a SharePoint site collection with a modern search page.
- Import a SharePoint module in PowerShell using the following command:
Install-Module -Name Microsoft.Online.SharePoint.PowerShell3
-
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'