How KnowledgeBricks handles your data
A plain-English guide to what we access, what we store, and what we deliberately do not do. Written for security teams reviewing the Microsoft 365 integration consent screen. Feel free to share this page with your IT or procurement function.
The short version
- We don't store the contents of your files. When you attach a OneDrive or SharePoint document to an engagement, KnowledgeBricks stores only the link, the document's title, and metadata you typed in. The file itself stays on your tenant.
- The integration acts as you, not as a service account. Every read and write is performed using your delegated Microsoft identity. Microsoft's audit log shows your username, not "KnowledgeBricks." We cannot see files you cannot see.
- You can disconnect at any time. One click on the integrations page revokes our refresh token and your tokens are deleted from our database. No further calls are possible.
- Read/write is required so the app can write back. When you click "Export to OneDrive" the app needs write permission to land the file in your drive. Without write, the integration can only browse, which makes it useless for the workflows we ship today. We are actively migrating to a per-file token model (see "Roadmap" below).
What Microsoft Graph permissions we request
When you click "Connect Microsoft 365" you authorize a delegated OAuth grant against your personal Microsoft account. Delegated means the integration can only act on files you have rights to, inheriting your role-based access controls in OneDrive and SharePoint.
| Microsoft scope | What it allows | Why we need it |
|---|---|---|
Files.Read | Read files the signed-in user can access in OneDrive. Read-only. | Browse OneDrive when you pick a file to attach. We never write outside the app folder using this scope. |
Files.ReadWrite.AppFolder | Read and write only inside the application's own folder: /Apps/KnowledgeBricks/. Microsoft enforces this boundary. The app cannot see or modify anything outside. | Lands "Export to OneDrive" output in your /Apps/KnowledgeBricks folder. No access required to the rest of your drive. |
User.Read | Read your name, email, and Microsoft profile photo. | Confirms the right account is connected and displays it in the UI. |
offline_access | Issues a refresh token so you don't have to re-consent every hour. | You can revoke this at any time from your Microsoft account or our integrations page. |
What we deliberately do NOT request: Files.ReadWrite or Files.ReadWrite.All (broader read/write outside the app folder), Sites.* (SharePoint), Mail.*, Calendars.*, Directory.*, or any scope that requires tenant-admin consent. The integration is user-scoped, sandboxed to a single app folder for writes, and read-only outside that folder.
About the "app folder" permission
Microsoft's consent screen describes the Files.ReadWrite.AppFolder
scope as "Have full access to the application's folder: read, create, update
and delete files in the application's folder." This wording sounds broad
but the boundary is narrower than it reads.
What we CAN do
- Read, write, and delete files inside
/Apps/KnowledgeBricks/in your OneDrive - Create subfolders inside that one folder (e.g. per-client folders for exported sessions)
What we CANNOT do
- Read, modify, or delete anything outside
/Apps/KnowledgeBricks/ - Access your Documents, Desktop, Pictures, or any other top-level OneDrive folder
- Touch any SharePoint site, Teams file, or shared library
- Access any other app's folder under
/Apps/
This boundary is enforced by Microsoft, not by us.
Microsoft Graph rejects any request from our access token that tries to read
or write outside /Apps/KnowledgeBricks/. We cannot bypass it
even if we wanted to. The token simply doesn't grant access elsewhere.
Why we need write access (not just read)
The Files.ReadWrite.AppFolder scope bundles four operations:
read, create, update, and delete. Our actual code uses two:
- Create: when you click "Export to OneDrive," we write a markdown file with your Cowork session output
- Update: if you re-export the same session, the file is overwritten in place
We never read files back from the app folder (your browser already has the content) and we never delete files (only you can do that from OneDrive). The read and delete capabilities exist in the scope because Microsoft doesn't offer a write-only or create-only variant, but our code never invokes them.
Verify it yourself. Open OneDrive, navigate to
/Apps/KnowledgeBricks/, and you can see exactly what we've written,
nothing more. You can rename, move, or delete these files at any time, and you
can disconnect the integration to stop further writes.
What we store on our servers
We store
- Your refresh token (encrypted at rest)
- The document link to each file you attach
- The title and document type you typed in
- Audit log of each connect / disconnect / file action
- Your Microsoft profile email so we can show it in the UI
We do NOT store
- File contents (bytes): files pass through in memory only
- File previews, thumbnails, or cached copies
- Folder structures you didn't explicitly link
- Mail, calendar entries, or contacts
- Anything from other users in your tenant
How a file action actually works
- You click "Attach from OneDrive" inside an engagement.
- Your browser fetches a fresh access token from our token endpoint, server-side, using the refresh token stored in our database.
- The browser hands that token directly to Microsoft Graph (
graph.microsoft.com) to list folders / files you can see. - You pick a file. We store the sharing link and metadata, never the file bytes.
- When you "Export to OneDrive," the same flow happens in reverse: we generate the document on our server, send it to Microsoft Graph in your name, and Microsoft stores it in your drive. We discard our copy immediately.
At no point is your file content written to KnowledgeBricks's database, object storage, or backups. The exception is the link string itself, which is the same thing you'd paste into an email.
Tenant isolation
Each customer's data is logically separated by Clerk organization ID at every database query. No tenant can see another tenant's documents, engagements, tokens, or audit logs.
Tokens are encrypted at rest using AES-256-GCM with a customer-scoped key derivation. Even if our database were compromised, tokens cannot be replayed without the application key.
What your Microsoft admin can do
- Approve or block the app at the tenant level. Through the Microsoft Entra admin center, under Enterprise applications, your admin can require admin consent for KnowledgeBricks, restrict which users can connect, or block it entirely.
- Revoke at any time. Microsoft tokens are listed in each user's account under "My sign-ins" and then Apps. Revoking there severs the integration immediately.
- Audit every action. Every Graph call shows up in the Microsoft 365 unified audit log with the user's identity, the file touched, and the time. We do not obscure or proxy these calls.
Security practices
- Transport: TLS 1.2+ end-to-end. No plaintext over the wire.
- At rest: AES-256 encryption on the database and on object storage.
- Token storage: Refresh tokens are encrypted with a separate application-layer key.
- Authentication: Clerk (SOC 2 Type II) for user identity. MFA available; SSO supported on enterprise plans.
- Hosting: Vercel Functions in US-East. Database hosted on Supabase, US region.
- Backups: Encrypted, retained for 30 days.
- Logging: No request bodies for the Microsoft Graph proxy are written to logs. Only metadata: status code, duration, user, action.
- Dependencies: Renovate auto-updates run weekly. Critical CVEs are patched within 7 days.
Sub-processors
| Service | Purpose | Data processed | Region |
|---|---|---|---|
| Vercel | Application hosting | All app traffic | USA |
| Supabase | Database, object storage | App data, encrypted tokens | USA |
| Clerk | Identity / authentication | Email, name, IP, MFA | USA |
| Stripe | Billing | Payment method, billing email | USA |
| Anthropic | AI (cowork, ask) | Prompt text you submit | USA (zero-retention API) |
| Microsoft Graph | OneDrive / SharePoint API | File metadata + bytes you choose | Your tenant region |
Roadmap: narrowing the consent further
We agree the Files.ReadWrite scope is broader than ideal. Three changes are in flight:
- Microsoft Verified Publisher. Application in progress. When approved, the consent screen will show a blue "Verified" badge next to our publisher name.
- OneDrive / SharePoint File Picker SDK. This replaces the inline file browser. With the Picker, we ask only for
Files.Read.Selectedon connect, and a per-file token is issued each time you pick a document. - Sites.Selected mode for SharePoint. Your admin pre-approves specific sites the integration can touch. Available on enterprise plans alongside Clerk enterprise SSO.
Questions from your security team?
Email security@knowledgebricks.com for:
- Vendor security questionnaires (CAIQ, SIG-Lite)
- Data Processing Addendum (DPA) signature
- Architecture review calls
- Penetration test summary letter
- SOC 2 status update (Type I targeted for 2026 Q4)