This guide explains how to set up SharePoint integration with VT Writer, allowing users to leverage SharePoint documents as context for generative AI content creation.
Overview
SharePoint integration allows VT Writer users to access documents stored in SharePoint when using the "Use Files" feature with the AI assistant (Visi). This enables Retrieval Augmented Generation (RAG), where chunks of relevant content from selected documents are used as context when generating responses to prompts.
Prerequisites
Before configuring SharePoint integration, ensure:
- VT Writer 5.1.3 or above is installed
- Generative AI features are enabled in System Admin settings
- LLM integration is configured and working
- VTRAG (aka "Use Files" feature) is enabled in System Admin settings; see How to Deploy VisibleThread RAG (VTRAG) on Linux
- You have administrator access to Microsoft Entra (formerly Azure AD)
See: Frequently Asked Questions: VT Writer, VTRAG, and LLM Integration
Supported SharePoint Environments
VT Writer supports the following SharePoint environments:
-
For VisibleThread-hosted deployments:
- SharePoint Online (standard Microsoft cloud)
-
For customer-hosted deployments (on-premises or private cloud):
- SharePoint Online (standard Microsoft cloud)
- SharePoint in GCC (Government Community Cloud)
- SharePoint in GCC-High
Note: VT Writer does not support SharePoint Server editions.
Document Storage and Security
VT Writer does not store complete SharePoint documents. Instead, it:
- Stores only text chunks from documents that users select in the "Use Files" feature
- Saves these chunks in a vector database (PostgreSQL with pgvector)
- Automatically deletes chunks based on a configurable schedule (default is 90 days)
- Uses Microsoft's delegated access model, meaning users can only access documents they already have permission to view in SharePoint
Configuration Process
Setting up SharePoint integration involves two main steps:
- Creating an App Registration in Microsoft Entra
- Configuring the SharePoint connection in VT Writer
Step 1: Create an App Registration in Microsoft Entra
-
Navigate to Microsoft Entra Admin Center:
- Go to Microsoft Entra ID
- Click on Applications → App registrations
-
Create a new application:
- Click "New registration"
- Enter an Application Name (e.g., Writer-Sharepoint-Connect)
- Select "Accounts in this organizational directory only (Single tenant)"
- Under Redirect URI:
- Type: Web
- Value:
- For VisibleThread-hosted:
https://writer.visiblethread.com/docrepo/callback
- For customer-hosted:
https://[your-vt-writer-domain]/docrepo/callback
- For VisibleThread-hosted:
- Click Register
-
Configure API Permissions:
- Navigate to API permissions in the left menu
- Click "Add a permission"
- Select Microsoft Graph
- Add the following delegated permissions:
Sites.Read.All
Sites.Selected
User.Read
offline_access
openid
profile
-
Configure Authentication Settings:
- Navigate to Authentication in the left menu
- Under Implicit grant and hybrid flows, enable:
- ☑ Access tokens (used for implicit flows)
- ☑ ID tokens (used for implicit and hybrid flows)
- Click Save
-
Create a Client Secret:
- Navigate to Certificates & secrets in the left menu
- Click "New client secret"
- Provide a Description (e.g., writer-sharepoint-cert)
- Choose an Expiration period (e.g., 2 years)
- Click Add
- Copy the generated Client Secret Value and store it securely
-
Expose an API:
- Navigate to "Expose an API"
- Click "Add a scope"
- Scope Name:
Sites.Read.All
- Display Name: "Read Files"
-
Add App Registration Administrators (Optional):
- Navigate to "Owners"
- Click "Add Owners"
- Add administrators who should have permission to manage this App Registration
- Note: This step only determines who can administer the App Registration itself, not who can use SharePoint documents in VT Writer
-
Collect Required Information:
- Go back to App registrations, select your application
- Note down:
- Application (client) ID
- Directory (tenant) ID
- Client Secret (from step 5)
- SharePoint URL
Step 2: Configure VT Writer SharePoint Connection
-
Access System Admin Settings:
- Log in to VT Writer with administrator credentials
- Go to System Admin page
-
Configure SharePoint Connection:
- Scroll down to the Generative AI section
- Toggle "Enable SharePoint Connection" to On
- Fill in the following fields with information from the App Registration:
- Site URL: Your SharePoint URL
- Tenant ID: Directory (tenant) ID
- Client ID: Application (client) ID
- Client Secret: The client secret value you saved
-
Test Connection:
- Click "Test Connection" to verify your configuration
- If successful, click "Save Changes"
Example:
Using SharePoint Documents in VT Writer
Once configured, users can access SharePoint documents when using Visi (the AI assistant):
- In the content editor, click on the Visi icon to open the AI assistant
- Click on "Use Files"
- Select "SharePoint" from the source options
- Browse available sites and folders
- Select documents to include in the collection
- Create a prompt that references information in those documents
- Visi will use the selected documents as context when generating a response
Troubleshooting
Common issues and solutions:
-
Connection Test Fails:
- Verify the redirect URI in your Entra App Registration matches your VT Writer domain
- Check that all required permissions are properly configured
- Ensure the client secret hasn't expired
-
Users Can't See SharePoint Documents:
- Verify users have been added as Owners in the App Registration
- Check that users have appropriate permissions in SharePoint for the documents
- Ensure the SharePoint connection is enabled in VT Writer
-
"Use Files" Option Not Available:
- Verify that both "Enable Use Files" and "Enable SharePoint Connection" are turned on
- Check that VTRAG is properly configured if you're using this component
For additional assistance, contact VisibleThread Support at support@visiblethread.com.