Use caseKnowledge and search

A company assistant that answers from SharePoint and Drive, and respects who may see what

An internal AI assistant that answers staff from SharePoint, Drive, Confluence and Slack, cites every source, and never shows a file the asker cannot open.

A blueprint, not a client story. The business described is illustrative; the architecture, integrations and trade-offs are real, and this is how I would build it. By Ergini, .

The short version

A company assistant that answers staff questions in Teams and Slack from SharePoint, Google Drive, Confluence and Slack, with a link to the source behind every claim. It searches only what the person asking is allowed to open, mirrored from each system's own permissions, flags outdated and contradicting documents, and says plainly when it cannot find something. Document owners get a weekly list of unanswered questions, which tells them what to write next.

Best for
Firms of 100 to 1,000 people with years of documents across SharePoint, Drive and Confluence, where finding the current version costs time daily.
Connects to
SharePoint and Teams, Google Drive, Slack, Confluence or Notion, Microsoft Entra ID or Google groups, Postgres with pgvector
The AI does
Turns questions into searches in English and German, ranks the passages found, and writes short answers from them with a citation on every claim.
People do
Decide which folders are indexed at all, own the documents it cites, and fix the gaps and conflicts it reports each Monday.
Built as
AI Integration, usually $15K - $35K

Fifteen years of project files and a search box nobody trusts

Picture a 250-person engineering consultancy with offices in Vienna, Linz and Graz. Fifteen years of work sit in SharePoint: calculation notes, design basis reports, method statements, inspection records and lessons-learned reports, migrated from a file server in 2019 with their folder permissions more or less intact. The QA manual and engineering standards live in Confluence. The Graz office came with an acquisition and still runs Google Workspace and Slack.

The questions are ordinary. Which version of the design check procedure applies to a project started in 2022? Is there a standard detail for a steel-to-concrete connection? What went wrong with the pile tests on the logistics hub? The answers live in documents and in a few senior engineers' heads, so people ask in a Teams channel and wait, or try SharePoint search and get forty files called 'Final'. Atlassian, which sells Confluence and so has a stake in the answer, reported in its State of Teams 2025 survey that teams lose a quarter of their time searching for answers.

Microsoft 365 Copilot would help the people with a seat, but the firm licensed it for managers and the bid team, not for 200 engineers, and it does not read the Graz office's Drive. The bigger worry is the one that shelves these projects: an assistant that quotes the partners' meeting notes or a salary review to anyone who asks, because a folder was shared too widely in 2017.

A site engineer's question, answered with its sources

The engineer sees a short answer with two sources. Behind it, four calls either narrow what the assistant may read or check what it is about to say.

Microsoft Teams, Tuesday 08:40

  1. Site engineer · Teams

    Do we need an independent check on the temporary works design for the Wels bridge job, and which form do I use?

  2. resolve_user(teams_id: "29:1a8f...")m.huber / Entra ID / 14 groups incl. Linz-Structures and Project-2231 / cached 6 min ago
  3. search(q: "independent check temporary works", lang: ["en", "de"], as_user: "m.huber")38 passages from 11 documents / 4 passages removed by the permission filter before ranking
  4. rerank(top: 8)QA-07 Design Checking v4 (Confluence, 2024) / QA-07 v3 (SharePoint project folder, 2021) / Form F-12 / 5 below threshold
  5. check_freshness(docs: ["QA-07 v4", "QA-07 v3"])v3 superseded by v4 on 12 Mar 2024 / v3 still saved in 3 project folders / owner: Head of QA
  6. Assistant · Teams

    Yes. Under QA-07 Design Checking (version 4, March 2024), every temporary works design needs an independent check by an engineer outside the design team, recorded on form F-12 before the works are loaded. Sources: QA-07 v4, section 5.3; Form F-12. An older version (v3, 2021) is still saved in some project folders and allows the check by a colleague in the same team. Version 4 replaces it.

  7. The four removed passages came from a folder this engineer cannot open. The log records that they existed; neither the engineer nor the model sees them.
Every sentence maps to a cited passage, checked before posting. The version conflict is stated rather than hidden, and settled by the controlled QA space rather than by the model's preference.

From a question in Teams to an answer with sources

Two steps use a language model and one a smaller ranking model. Everything that decides what a person may read, and whether an answer goes out, is plain code.

  1. 01 Trigger · Teams bot, Slack Events API

    A question arrives in Teams or Slack

    Through a Teams bot or an internal Slack app, as a direct message or a mention. Both call the same service, so answers and logs match wherever people ask.

  2. 02 Plain code · Microsoft Graph transitiveMemberOf, Google groups

    Work out who is asking

    The chat account is mapped to an Entra ID or Google identity and its groups are expanded, nested ones included, cached for minutes rather than days. An account that cannot be mapped gets a sign-in prompt, not an answer.

  3. 03 AI model · Structured output

    Turn the question into searches

    A small model rewrites the question into two or three searches, expands the firm's abbreviations, adds German terms for German documents, and extracts filters such as a project number, all under a strict output schema.

  4. 04 System · Postgres with pgvector, reranker

    Search only what this person may open

    Keyword and vector search run with the person's groups applied inside the query, so restricted passages never enter the results. A reranking model, not a language model, keeps the best eight of the top forty.

  5. 05 Decision

    Is there enough to answer?

    Relevance thresholds and document metadata decide, not the model.

    • Relevant passages from current documents the person may open then write the answer
    • Two current documents disagree, or the best source is marked superseded then answer with both sources and their dates, and flag the conflict to both owners
    • Nothing relevant that this person may open then reply 'I could not find this' and add the question to the gap report
  6. 06 AI model

    Write the answer from the passages only

    A larger model writes a short answer in the question's language, with a passage ID after every claim and numbers copied exactly. It has no tools: it cannot open links, browse or send anything.

  7. 07 Plain code

    Check every citation before posting

    Every cited ID must be among the passages retrieved for this person, and every number must appear in the passage it cites. One failed check means one rewrite; a second failure posts plain links to the top documents instead.

  8. 08 Person

    Owners fix what the assistant exposes

    Each Monday the knowledge manager and document owners get the unanswered questions by topic, the conflicts found and the outdated documents still being cited. They fix documents; the assistant never edits one.

  9. 09 Result · Audit log

    The answer is posted and logged

    The reply goes back with source links and a thumbs-up and thumbs-down. The log keeps the question, the passage IDs, the count removed by permissions, the answer and the feedback, pseudonymized for the weekly review.

What gets indexed, and whose permissions it carries

Every source keeps its own permission model. Next to each passage, the index stores the people and groups allowed to read it, copied from the source.

SharePoint project sitesWord, PDF and PowerPoint files in project librariesItem permissions from Microsoft Graph, broken inheritance included; groups expanded through Entra IDOn, site by site, through the Sites.Selected permission
SharePoint HR, finance and partner sitesNothingNot applicableOff until HR or the partners opt a folder in
Confluence QA and standards spacesPages and attachmentsSpace permissions plus page restrictions, which child pages inheritOn, and ranked as the most authoritative source
Google Drive, Graz officeShared drives for projectsDrive file permissions, with Google groups expandedOn for shared drives, off for personal My Drive folders
Slack, Graz officeListed public channels such as #ask-engineeringChannel membershipOn for listed channels only
Organization-wide sharing linksOnly what the item's real permissions already grantThe link is ignored as a grantAlways: a link someone could forward is not access
If a person cannot open a file in SharePoint, the assistant cannot quote it to them.

Keeping the index as current as the documents

Retrieval is only as good as the copy it searches. Ingestion runs on its own schedule and never waits for a question.

  1. Connect each source read-only, with access an administrator grants and scoped as narrowly as the source allows: in SharePoint, Sites.Selected, so the app reads the listed sites and nothing else.
  2. Pull changes every ten minutes rather than everything: Graph delta queries, the Drive changes feed, Confluence's last-modified search and Slack events. Graph throttling, a 429 with a Retry-After header, is honored rather than fought.
  3. Re-embed a file only when its content changes, and key every write on the item's ID and version, so a renamed folder costs nothing and a retried sync never creates duplicates.
  4. Split documents by their own headings, keep the section number with each passage, and run OCR on scanned PDFs. Spreadsheets are indexed by sheet names and header rows only, because a calculation sheet is not prose.
  5. Copy permissions onto every passage and reconcile them all nightly, because changes that arrive through inheritance are easy to miss in change feeds.
  6. Record freshness signals: last modified date, owner, the version in the filename, 'superseded' markers and the QA system's review dates.
  7. Keep hidden text, comments and speaker notes apart and flagged. Text a reader cannot see is exactly where an instruction aimed at the assistant would hide.

Deletions and permission changes reach the index within one sync cycle; group memberships are checked live on every question.

Six ways a document assistant loses the firm's trust

These failures make people stop asking, and none of them is fixed by a better model.

Someone changes teams and the index has not noticed

Memberships are resolved live, and the nightly reconciliation catches inherited changes. Canary documents make this testable: a file with a unique phrase sits in each restricted area, and every night an account without access searches for it. If the phrase ever comes back, that source is switched off and IT is alerted.

Two documents that disagree

The 2019 design guide says one thing, the 2023 one another. The assistant never picks silently: it answers from the newer document in the controlled space, names the other with its date, and tells both owners. Conflicts it cannot rank go to the knowledge manager.

The HR folder that should never have been indexed

HR, payroll, partner and disciplinary areas are excluded by default and opted in folder by folder by the people who own them. Files carrying a confidential Microsoft Purview sensitivity label are skipped wherever they sit.

A document that gives the assistant instructions

A supplier's PDF can hide white-on-white text telling the model to ignore its rules, and OWASP lists poisoned retrieval documents among its prompt injection scenarios. Passages are treated as quoted material, hidden text is flagged at ingest, and the assistant has no tools, so the worst case is one distorted answer whose source passage is logged and can be removed. The prompt injection guide covers the patterns.

A citation that does not say what the answer claims

The model can only cite passages retrieved for this person, and code checks every number and clause reference against the passage cited. A wrong citation does more damage than no answer, because people stop clicking the sources.

The answer that was right in 2016

Answers show each source's date. Documents past their review date, or untouched for five years yet still cited, are marked as possibly outdated and listed for their owner. Old is not the same as wrong, so nothing is deleted automatically.

From a test set to the whole firm

The assistant only reads, so the risks are a wrong answer or a leaked passage. Each stage has to show neither before more people get it.

Test set onlyNobody: 150 real questions from Teams channels and QA tickets, each with the source an expert chose, plus 30 it must refuseThe right document ranks near the top for most questions, and no must-refuse question returns a restricted passage
PilotThe Linz office, about 60 people, in TeamsThumbs-down answers reviewed weekly, clean canary checks, owners acting on the gap report
Firm-wideEveryone, answering from SharePoint and ConfluenceA month without a permission incident and a stable test-set score
Graz sourcesDrive and Slack indexed, answers in Slack tooThe Google side passes the same canary and test-set checks
The test set reruns on every prompt, model or chunking change, and a lower score does not ship. The evaluation framework comparison covers the tooling.

Copilot, Glean, or an assistant of your own?

If everyone who needs answers already has a Microsoft 365 Copilot license and the documents live in SharePoint, OneDrive and Teams, start with Copilot. It answers only from what each user can already open, and the work it forces on you, finding overshared sites and fixing them, is work any assistant needs. Glean is the strong option for larger firms with many sources and a budget for per-seat enterprise software. Guru suits knowledge that fits on short cards experts verify on a schedule, and Notion AI is enough when everything already lives in Notion. If one of these covers you, I will say so.

A build earns its cost when the people asking have no Copilot seats, when documents are split across Microsoft and Google after an acquisition, when data has to stay on EU infrastructure or run on a self-hosted model, or when answers depend on sources no product indexes well, such as a project database or a drawing register. It also stays yours: the test set, the gap report and the permission tests.

The two combine well. Staff with Copilot keep it, and the custom index serves everyone else in Teams and Slack. The same index can sit behind an MCP server, so Copilot, Claude or ChatGPT search it through the same permission filter, and it plugs into a private AI gateway for staff who also want a general assistant.

How you would know it is working

A blueprint has no results to report, so here is what I would measure from the first week instead, on your own data.

Answered with a source
Questions answered with at least one citation, against 'I could not find this'. The second number feeds the gap report.
Citation accuracy
Twenty answers a week, checked by a person: does the cited passage support the sentence?
Permission incidents
Canary hits plus reports of seeing something one should not. The target is zero; one incident pauses the source.
Gaps closed
Documents written or fixed from the unanswered-questions list: proof the knowledge itself is improving.
Repeat use
People who ask again in their second and fourth week. Novelty brings people once; good answers bring them back.

What a build like this costs

This is built as AI Integration, which runs $3.5K - $45K overall. A build like this one usually lands in the retrieval over your documents, with evaluation tier: $15K - $35K, 3-6 weeks. The first working version runs on your real data well before the end of that window.

What it costs to run

Model usage depends on which model writes the answers and how often people ask. With a mid-priced model and a few questions per person a day, 250 people usually cost hundreds of dollars a month, not thousands, and hosting the index and sync workers is of the same order. On the first ingest, OCR of scanned archives can cost more than embedding all the text.

What moves the price

  • How many sources, and how tangled their permissions are: broken inheritance, nested groups and years of ad-hoc sharing
  • The document mix: scanned archives that need OCR, spreadsheets, drawings, more than one language
  • How many places answers appear: Teams, Slack, a web page, or an MCP endpoint
  • The size of the test set, and whether experts write the reference answers
  • Hosting constraints: EU-only infrastructure, a self-hosted model, customer-managed keys

Who this is for

  • Engineering and architecture consultancies with a decade of project files in SharePoint and a QA manual in Confluence
  • Law firms whose document management system enforces ethical walls that any assistant must respect
  • Agencies and SaaS companies running Google Workspace and Slack beside a Microsoft office from an acquisition
  • Firms where only managers have Copilot and everyone else still asks in a Teams channel

Questions people ask about this

Can an AI assistant answer from SharePoint without showing people files they are not allowed to open?

Yes, if permissions are enforced at the moment of each question. Every passage in the index carries the people and groups allowed to read it, copied from SharePoint, and the search filters on the asker's groups before anything reaches the model. Nightly reconciliation catches permission changes, and canary documents prove nothing leaks. Filtering after the model has seen a passage is too late.

Is there an MCP server for SharePoint?

Yes. Microsoft publishes Work IQ MCP servers for OneDrive and SharePoint, SharePoint lists and Teams, reached through Agent 365 inside your own tenant. They suit people who already work in Copilot or another assistant with Microsoft licensing. A custom index covers what they do not, such as Google Drive, Confluence or a project database, behind one permission filter.

Does Microsoft 365 Copilot already do this?

For licensed users and Microsoft content, largely yes: Copilot answers from what each user can already open. It does not cover staff without a license, and it will not refuse to answer without a citation or send unanswered questions to document owners. A custom assistant covers those gaps, and the two can run side by side.

Can a Slack bot answer questions from our company documents?

Yes, and it should be an internal app built for your own workspace. Since May 2025 Slack has limited apps distributed outside its Marketplace to one request per minute on message history, while internal apps keep the full limits. Slack's official MCP server is also open only to Marketplace and internal apps. An internal bot uses the same permission-filtered search as the Teams one.

How much does an internal AI knowledge assistant cost?

The build usually falls in the retrieval-with-evaluation tier of the AI integration range shown on this page. Messy permissions, scanned archives and extra sources push it up; one clean SharePoint tenant keeps it down. After launch you pay for model usage and hosting, which for a few hundred staff is a modest monthly line rather than a second license bill.

Sources