This article explains how to set up the Microsoft 365 Knowledge Connector in Templafy and use it to connect SharePoint content as a knowledge source for AI Assistant prompt templates and Document Agents.
Prerequisites
|
Overview
The Microsoft 365 Knowledge Connector allows Templafy to pull context directly from your organization's SharePoint via the Microsoft Copilot Retrieval API. Instead of manually uploading files into Templafy, admins can point a knowledge source at a SharePoint folder or file, and Templafy will retrieve relevant content from there at query time.
Setup involves two steps: first configuring the connector once at the tenant level, then adding one or more SharePoint knowledge sources that use it.
ImportantThe Microsoft 365 Knowledge Connector uses the Microsoft Copilot Retrieval API. If your organization does not have a Microsoft 365 Copilot license, usage will be billed via metered consumption, which can be very expensive. Confirm your licensing status before enabling this connector. |
Setting up the connector
The connector is configured once per Templafy tenant. Once set up, it can be used for any number of SharePoint knowledge sources.
- In the Admin Center, navigate to AI Assistant and select the Connectors tab.
- Scroll down to the Knowledge connectors section and click Add knowledge connector.
- Select Microsoft 365 Connector.
- Enter your Microsoft 365 Tenant ID. If you do not know your Tenant ID, it can be found at whatismytenantid.com.
- Click Save. The connector is now ready to use.
NoteThe first time any user in your organization uses a prompt template or Document Agent connected to this connector, the Microsoft tenant admin will need to approve Templafy's permission to read files via the API. This approval is a one-time action. |
Adding a SharePoint knowledge source
Once the connector is configured, you can create knowledge sources that point to content in SharePoint. Each knowledge source can target a specific SharePoint site, folder, or file.
- In the Admin Center, navigate to AI Assistant and select the Knowledge tab.
- Click Add knowledge source and select Add from SharePoint.
- Enter a Name and Description for the knowledge source. These are for administrative reference only and are not used by the AI.
- Optionally, enter a Path to filter the knowledge source to a specific SharePoint folder or file.
- Click Save.
NoteFiltering by path is strongly recommended. Without a path filter, the knowledge source searches across your entire SharePoint tenant, which can return irrelevant results and slow down responses. |
Finding the correct SharePoint path
When filtering a knowledge source to a specific SharePoint location, the path must be copied from the SharePoint file details panel — not from the browser URL bar.
ImportantDo not use the URL from your browser's address bar as the path. The path used by the Copilot Retrieval API is different from the URL shown in SharePoint. Using the wrong path will cause the knowledge source to return no results. |
To find the correct path:
- In SharePoint, navigate to the folder or file you want to use.
- Right-click the folder or file and select Details.
- Click More details at the bottom of the panel and scroll down.
- Copy the value shown in the Path field.
- Paste this value into the Path field in Templafy when creating the knowledge source.
TipAdvanced filtering using KQL (Keyword Query Language) syntax is also supported if you need more precise control over what content is included. See the Microsoft KQL syntax reference for details. |
Testing a SharePoint knowledge source
After creating a SharePoint knowledge source, use the built-in test tool to verify it is returning the expected content before connecting it to a prompt template or Document Agent.
- In the Knowledge tab, locate the SharePoint knowledge source you want to test.
- Click the Test button on the knowledge source card.
- In the dialog that opens, enter a search query that represents a typical question or piece of context a user might provide.
- Review the returned results to confirm the correct SharePoint content is being retrieved.
User login and permissions
When end users interact with a prompt template or Document Agent that uses a SharePoint knowledge source, they will be prompted to log in through Templafy to authenticate with Microsoft 365. This is required for the Copilot Retrieval API to retrieve files on their behalf and ensures that each user only accesses SharePoint content they have permission to view.
NoteUser permissions in SharePoint are respected. If a user does not have access to a file or folder in SharePoint, that content will not be returned even if it falls within the path configured for the knowledge source. |
Comments
Article is closed for comments.