Sources & sync
Track folders from SharePoint or OneDrive, keep them in sync with one click, route new files to projects automatically, and answer questions in the Library with provenance.
The Sources tab in the sidebar is where you manage every folder Knowledge is keeping in sync with SharePoint or OneDrive. One row per folder, with status, last sync result, destination projects, and the buttons you need (Sync now, Edit projects & settings, Stop tracking) in one place.
Mental model. Configuration (Connect SharePoint, Connect OneDrive, grant a site) lives under Settings. Day-to-day operations (which folders, are they fresh, where do new files go) live under Sources. The Manage → links on the Sources page take you straight to the matching Settings card when you need it.
What you can do
| Workflow | Who | Where in the app |
|---|---|---|
| Ingest one file by pasting its SharePoint or OneDrive link | Any signed-in user | Upload → Or fetch from SharePoint or OneDrive |
| Browse your own OneDrive and pick files | Any signed-in user (after connecting OneDrive) | Upload → Or fetch from SharePoint or OneDrive → Browse my OneDrive |
| Ingest an entire folder (with optional recursion into sub-folders) | Any signed-in user | Folder browse pane → Ingest entire folder |
| Track a folder for ongoing one-click sync | Any signed-in user (tenant admin for SharePoint sites) | Folder browse pane → Track this folder; manage at Sources |
| Sync a single tracked folder on demand | Tenant admin | Sources → row → Sync now |
| Re-route new files to different projects | Tenant admin | Sources → row → Edit projects & settings |
| Re-pull every synced document on the current Library page | Anyone who can manage the rows | Library → Sync all |
Connect your OneDrive (one-time, per user)
OneDrive uses delegated authentication: each user signs in to their own Microsoft account, and Knowledge only sees what that user can see. There's no tenant-wide admin grant — every teammate connects independently.
- Open Settings → OneDrive connector.
- Click Connect OneDrive. You'll be redirected to Microsoft to sign in.
- Microsoft shows a consent prompt for Olyteck Ask – Document Sync requesting
Files.Read.All(delegated),User.Read, andoffline_access. Accept. - You're redirected back to Knowledge. The card shows Connected as you@yourdomain (business / personal).
Both work accounts (M365) and personal Microsoft accounts work — Knowledge
uses the /common authority so the same flow handles both.
What the OneDrive scope actually grants. Files.Read.All
delegated lets Knowledge read any file you can read — your own OneDrive
plus files shared with you. It cannot upload, modify, share, or delete anything.
Knowledge never reads files for any other user. Disconnect any time from the same
card; previously-ingested documents stay in your Library and the Sync button stops
working until you reconnect.
Ingest a single file by pasting a link
- In SharePoint or OneDrive, right-click the file → Copy link.
- In Knowledge, go to Upload → expand Or fetch from SharePoint or OneDrive.
- Paste the URL into the input. Click Fetch.
Knowledge auto-detects whether the URL is SharePoint or OneDrive by host:
*-my.sharepoint.com and *.sharepoint.com/personal/… are
treated as OneDrive (your delegated token); everything else under
*.sharepoint.com uses the site grant. You don't need to know which
is which — paste any link.
Browse your own OneDrive
Click Browse my OneDrive below the URL form. The picker lands on your drive root and shows top-level folders and files. From there:
- Click Open on a sub-folder to drill in.
- ← Up in the breadcrumb pops back to the parent.
- Per sub-folder row, Ingest entire folder queues every file in that folder in one click; if the folder contains sub-folders, Knowledge asks whether to recurse (max 5 levels, 1000 files).
Ingest an entire folder (with or without recursion)
The folder browse pane has three ingest actions:
- Ingest N files — operates only on the file checkboxes you tick. Sub-folders are ignored. The button label updates live to show how many you've selected.
- Ingest entire folder (top action row) — queues every file at this level. If the folder contains sub-folders, you're asked: Just this folder (default, safe) or Include sub-folders (recursive). Recursion caps: 5 levels deep, 1000 files total, folder names starting with a dot are skipped.
- Ingest entire folder (per sub-folder row) — same behaviour, but lets you ingest a sub-folder without entering it first.
Cost control. Knowledge caps total daily fetches per workspace (default 50 on Starter, 500 on Pro) across URL, SharePoint, and OneDrive. The recursive walk respects the cap; if you hit it, the summary tells you so and the rest queues for tomorrow. Unchanged files are detected via SHA-256 hash and cost nothing — no re-embed, no quota burn.
Track a folder for ongoing sync
Tracking lets you click Sync now later (or wait for the daily cron, when enabled) and have Knowledge reconcile its copy of the folder against what's currently on SharePoint / OneDrive — without re-uploading.
- Browse to the folder in the Upload tab.
- Important — pick destination projects first. Use the project chips at the top of the Upload tab. Every file the sync pulls into Knowledge will be auto-assigned to those projects.
- Click Track this folder in the folder browse pane.
- You'll see a modal asking about auto-delete behaviour (see below) and showing which projects new files will land in.
- Confirm. The folder now appears under Sources in the sidebar.
The auto-delete question explained
When a file disappears from the source folder during a sync, what should Knowledge do with the matching document?
- Auto-delete on — archive it. The doc is marked
archived_atand excluded from search. You can still restore it from the Library for 30 days. Choose this for an "active mirror" of a folder that should track source state exactly. - Keep & flag stale (default, safer) — the doc stays in the Library with a stale flag. Your team decides whether to delete it. Choose this when you can't guarantee that "deleted at source" really means "no longer relevant".
The Sources view
Click Sources in the sidebar to see every tracked folder, regardless of provider. The page has two cards:
Connections card
Read-only summary: which providers you're connected to, how many SharePoint sites are granted, who's signed in on OneDrive, and how many teammates have connected. Each provider has a Manage → link that scrolls Settings to the matching connector card if you need to add a site, disconnect, or change a grant.
Tracked folders card
One row per folder. Per row you see:
- 📁 Folder name and a provider chip (SharePoint or OneDrive).
- Doc count, last sync time, last sync summary (+added ~updated −removed), and auto-delete state.
- New files → the destination project chips (or a muted land unassigned hint).
- Action buttons:
- Sync now — reconcile this folder once and report the summary.
- Edit projects & settings — open a modal to change destination projects, toggle auto-delete, without un-tracking.
- Open at source ↗ — opens the SharePoint / OneDrive URL of the folder in a new tab.
- Stop tracking — Knowledge forgets the folder. Existing documents stay in your Library; only the tracking row is removed.
A search box at the top filters the list by folder name or path — handy once you've tracked more than a handful of folders.
Edit projects & settings (after tracking)
Tracked-folder rows expose Edit projects & settings. The modal shows:
- Destination projects — checkboxes for every project in your workspace. Tick the ones you want new files to land in. Unticking all is allowed — new files will land unassigned.
- Auto-delete on source removal — toggle the behaviour you set at track time.
Changes apply to future syncs only. Documents already in your Library aren't reassigned automatically. If you need to attach an existing doc to a new project, use the Library's row menu → Add to project, or the bulk-assign banner after selecting rows.
Sync all (Library toolbar)
When the Library view contains rows backed by a SharePoint, OneDrive, or URL source, a Sync all (N) button appears next to Refresh. Clicking it triggers a sync on every visible synced row, 3 at a time, with a progress counter in the button and a summary toast when it finishes ("4 up-to-date, 1 queued, 1 failed").
Visible rows only. Sync all does not reach rows on other pages of the Library, by design — keeps the action bounded and the scope obvious. If you have 200 synced docs, paginate and click again, or use per-folder Sync now from Sources to do them in batches.
Library source badges
Documents that came in through a sync carry a small badge in the title cell:
- SP — from SharePoint.
- OD — from OneDrive.
- URL — from a Phase A URL ingest.
- SP 📁 / OD 📁 — ingested via a tracked folder.
- ⚠ SP — sync / ⚠ OD — sync — the source has changed (or the file was removed). Click Sync to reconcile.
Hover the badge to see the source URL, the tracked folder name (if any), and the auto-delete state. Click the badge to open the source in a new tab — useful when you want to verify a citation against the original.
OneDrive — security & scope
What permissions does OneDrive have?
| Permission | Type | Used for | Data access |
|---|---|---|---|
Files.Read.All |
Delegated | Reading files the signed-in user can read | Only as the signed-in user. Knowledge sees their OneDrive plus files shared with them. Nothing in any other user's drive. |
User.Read |
Delegated | Reading the user's display name and email for the connector UI | Profile fields only — no contacts, no calendar, no directory. |
offline_access |
Delegated | Issuing a refresh token so syncs can run without re-prompting the user every hour | None on its own — just refreshes the access token. |
What the connector cannot do
- Cannot read another teammate's OneDrive. The token is per user; each teammate must connect their own account.
- Cannot write to OneDrive. Read-only.
- Cannot read Teams chat attachments that live in someone else's OneDrive, unless that file was explicitly shared with the connected user.
- Cannot access SharePoint sites via this token — the SharePoint connector is a separate scope (see SharePoint help).
- Cannot bypass OneDrive permissions. If you can't open a file in OneDrive yourself, Knowledge can't either.
Token storage
- Access tokens are short-lived (≤ 1 hour) and refreshed silently when ≤ 5 min remain.
- Refresh tokens roll on every refresh (Microsoft re-issues), with a ~90-day sliding window.
- Both are stored in your tenant's database under
rag_graph_user_tokens, scoped to the (workspace, user) pair. - Disconnecting (Settings → OneDrive connector → Disconnect) deletes the row. The Microsoft side of the consent stays — revoke fully from Entra portal → My account → Apps & services if needed.
Audit trail
Every Graph API call (token request, share resolve, driveItem fetch, folder
list, folder track/sync/edit, OneDrive connect/disconnect) is recorded in
platform.audit_log with action, tenant, user, target endpoint,
and HTTP result. Available to tenant admins on request.
Troubleshooting
"no OneDrive connection for this user — click Connect OneDrive first"
You haven't connected OneDrive yet for the account you're signed in with. Open Settings → OneDrive connector and click Connect OneDrive. The connection is per-user — your teammate connecting theirs doesn't connect yours.
"OneDrive refresh failed: AADSTS70008 / AADSTS65001"
Your refresh token has expired or your consent was revoked at Microsoft. Open Settings → OneDrive connector → Reconnect OneDrive. You'll be redirected to Microsoft to sign in again and the connection is restored. Existing tracked folders and ingested docs are unaffected.
"parent SharePoint site is not connected to your Ask tenant"
You pasted a SharePoint file URL whose parent site hasn't been granted yet (this is the SharePoint connector, not OneDrive). Tenant admin: Settings → SharePoint connector → Add & grant with the site root URL. SharePoint connector help.
"Sync done: +0 ~0 −0 unchanged" — but I added a file at the source
If you just added the file, Microsoft may not have indexed it yet — try again in a minute. If you renamed an existing file, sync sees no eTag change because the underlying driveItem id is unchanged — that's correct behaviour, the doc is the same content. If the file is in a sub-folder of the tracked folder, sync only walks one level by design (sub-folder recursion needs Track this folder on the sub-folder, or one-shot Ingest entire folder with recursion enabled).
"Sync failed: parent SharePoint site is not connected"
Your admin revoked Knowledge's access to the underlying site. The tracked folder row will keep failing until access is re-granted. Either re-grant the site under Settings → SharePoint connector, or Stop tracking the folder and the row vanishes.
"New files land unassigned" — I picked projects when I tracked the folder
That label means the folder currently has zero destination projects on record. Click Edit projects & settings on the Sources row and tick the projects you want. The change applies to the next sync.
The Sources sidebar count is stale
The number on the Sources sidebar tab refreshes when you visit Sources, after you track a new folder, and after Stop tracking. Click Refresh on the Sources view header if you want to force a refetch.