Microsoft Search
Quick Start
Configure Azure App
Register App
Go to Microsoft Azure Portal and navigate to App registrations
.
Register a new app with the option New registration
.
Type the name and select the option Accounts in this organizational directory only
and submit the registration with register
.
Omit the Redirect URI
for your app.
Create Client Secret
Add Client Secret under Certificates & secrets → Client secrets
.
Submit your new client secret with the option New client secret
.
Define API Permissions
The connector requires access to the Microsoft Search External Connection/Item API for synchronizing external content items and to Users/Groups API for synchronizing principal information.
To assign the required permission to your app, navigate to API permissions
inside your app menu.
With the option Add a permission
, you can assign new permissions to your app.
Register all permissions as Microsoft Graph API Application permission.
Configure External Connection
The item metadata that the connector sends to Microsoft Search is defined by a schema, this schema is generated within Microsoft Search and defines the fields used by Microsoft Search. Therefore, the schema must be generated before a connector can run a traversal to ingest documents. This section describes the steps required to create a default schema within Microsoft Search, the request to generate the schema can be modified as required prior to creating the schema. There are 3 steps to setup Microsoft Search prior to using the connector to ingest documents:
-
Authenticate against Microsoft Search
-
Create a Connection ID within Microsoft Search
-
Generate a schema within the Connection ID
These steps are performed via the Microsoft Search API, the following guide provides a Postman Workspace for calling the Microsoft Search API endpoints:
The Connection ID can only contain ASCII alphanumeric characters, and must be between 3 and 32 characters long. e.g. 2ecbffec1da74fab8057b4530d3c442a.
Create new Connection
Headers
Content-Type:application/json
Authentication:Access Token
Body Request
{ "name": "Raytion Microsoft Search Connector for Filesystem 1.0", "description": "Raytion Microsoft Search Connector for Filesystem 1.0", "id": "2ecbffec1da74fab8057b4530d3c442a" }
Create default Schema
Authentication:Access Token
Headers
-
Content-Type:application/json
-
prefer:respond-async
Body Request:
{ "baseType": "microsoft.graph.externalItem", "properties": [ { "name": "title", "type": "string", "isSearchable": true, "isRetrievable": true, "isQueryable": true, "labels": [ "title" ], "isRefinable": false, "aliases": [] }, { "name": "itemType", "type": "string", "isSearchable": true, "isRetrievable": true, "isQueryable": true, "labels": [], "isRefinable": false, "aliases": [] }, { "name": "mimeType", "type": "string", "isSearchable": true, "isRetrievable": true, "isQueryable": true, "labels": [], "isRefinable": false, "aliases": [] }, { "name": "fileExtension", "type": "string", "isSearchable": true, "isRetrievable": true, "isQueryable": true, "labels": [ "fileExtension" ], "isRefinable": false, "aliases": [] }, { "name": "previewUrl", "type": "string", "isSearchable": true, "isRetrievable": true, "isQueryable": true, "labels": [], "isRefinable": false, "aliases": [] }, { "name": "clickUrl", "type": "string", "isSearchable": true, "isRetrievable": true, "isQueryable": true, "labels": [ "url" ], "isRefinable": false, "aliases": [] }, { "name": "keywords", "type": "stringCollection", "isSearchable": true, "isRetrievable": true, "isQueryable": true, "labels": [], "isRefinable": false, "aliases": [] }, { "name": "languages", "type": "stringCollection", "isSearchable": true, "isRetrievable": true, "isQueryable": true, "labels": [], "isRefinable": false, "aliases": [] }, { "name": "author", "type": "stringCollection", "isSearchable": true, "isRetrievable": true, "isQueryable": true, "labels": [ "authors" ], "isRefinable": false, "aliases": [] }, { "name": "contributors", "type": "stringCollection", "isSearchable": true, "isRetrievable": true, "isQueryable": true, "labels": [], "isRefinable": false, "aliases": [] }, { "name": "createdDate", "type": "dateTime", "isSearchable": false, "isRetrievable": true, "isQueryable": true, "labels": [ "createdDateTime" ], "isRefinable": true, "aliases": [] }, { "name": "lastModifiedDate", "type": "dateTime", "isSearchable": false, "isRetrievable": true, "isQueryable": true, "labels": [ "lastModifiedDateTime" ], "isRefinable": true, "aliases": [] }, { "name": "source", "type": "string", "isSearchable": true, "isRetrievable": true, "isQueryable": true, "labels": [], "isRefinable": false, "aliases": [] }, { "name": "breadcrumbs", "type": "stringCollection", "isSearchable": true, "isRetrievable": true, "isQueryable": true, "labels": [], "isRefinable": false, "aliases": [] } ] }