Skip to content

SharePoint Online Connector

Indexing connector prerequisites

An application in Azure is required, and here's how to proceed:

  • connect with an admin account to https://x@x@x.azure.com
  • in the search bar, type: app registration
  • you will arrive at a page like the one below:

  • click on New registration
  • enter a name for your application, for example: Wikit-sync-sharepoint then validate

  • you can already note the information on the "Overview" page which will need to be transmitted to your Wikit contact:
    • Application (client) ID ✏️
    • Directory (tenant) ID ✏️

We will create a secret for your application, which will need to be transmitted to your Wikit contact.

To do this, click on Manage then on "Certificates & secrets", then on "New client secret", you can add a description and manage the expiration date.

⚠︎ Be sure to note the secret's end date, once this token expires your SharePoint synchronization will no longer work; you will need to remember to share the new one with the Wikit team before its expiration.

⚠︎ Be sure to transmit the secret's value and not the ID

We will now authorize the application to retrieve information from your SharePoint. To do this, we will go to "API permissions" and click on "Add a permission" then "Application permissions", search for site and select "Sites.Selected", validate by clicking on "Add permissions", finally, you can "Grant admin consent" by clicking on the button of the same name.

This authorization requires additional configuration to target the site to be shared with Wikit. To do this, you will need to make a request in Microsoft's Graph Explorer.

Direct link to the query ⇒ https://developer.microsoft.com/en-us/graph/graph-explorer

You will need to grant additional permission to your account by clicking on "Consent to permissions".

⚠️ The account used must have access to the targeted SharePoint. Microsoft offers several Sites.Selected permissions. You must be very careful to ensure it is the permission in Microsoft Graph and not SharePoint!

Search for sites.FullControl.All and click on Consent.

Once you have the necessary permissions, you can change the information: siteId in the URL, id and displayName in the request body.

⚠️ Remember to change {siteId} with your siteId.

⚠️ Replace id de votre application (your application's ID) with your application's ID in the box.

jsx
	Method: POST 
URL: "https://graph.microsoft.com/v1.0/sites/{siteId}/permissions"

Body: {
    "roles": [
        "read"
    ],
    "grantedToIdentities": [
        {
            "application": {
                "id": "your application's id",
                "displayName": "Wikit API"
            }
        }
    ]
}

You can remove the sites.FullControl.All permission from your account.

Once all these steps are completed, you can communicate the following information to the Wikit team:

  • the application ID
  • the directory (tenant) ID
  • the secret
  • the site ID

To retrieve the site ID:

jsx
https://wikitai.sharepoint.com/sites/{site-slug}/_api/site/id

The site slug is available in the SharePoint URL when you are on it.

Here is an example:

jsx
https://wikitai.sharepoint.com/sites/{site-slug}/...

Connector configuration

For field configuration: Paths to include, Paths to exclude, use the format Library-name/Folder-name.

To retrieve system folders like attachments, you need to enable the option "retrieve system folders".

⚠️ Be careful, by default, all system-type folders are retrieved. You will need to exclude paths to avoid retrieving unnecessary files.

For multi-site, all sub-sites are retrieved.