AI with Company Data: How to Test Access Revocation and Deletion
Test access revocation in an AI assistant both in a running session and in a new chat. Ask the same question before and after the change. Check what the search finds, which content the model receives and whether the assistant reuses earlier answers. For a deletion, also check the stored copies and how backups are handled.
- 1. Where can company data end up after an answer?
- 2. What is the difference between revoking access, deletion and a version change?
- 3. How do you test access revocation in an old chat?
- 3.1 1. Create a controlled test source
- 3.2 2. Measure the baseline
- 3.3 3. Revoke a permission and check the interval
- 3.4 4. Check what an existing conversation may keep
- 3.5 5. Also log the period between change and sync
- 4. How can deletion be tested all the way to a restore?
- 5. Which findings stop the go-live?
- 6. A practical example from the Cedars project
- 7. Frequently asked questions about testing AI with company data
- 7.1 Is it enough if the AI assistant no longer cites the file?
- 7.2 Which retention period applies to chat histories and backups?
- 7.3 What should the vendor demonstrate in a second demo?
Imagine an employee in technical support. Yesterday she was allowed to read the internal manual for system W17. Today she works in a different department. SharePoint already blocks the file. In her old chat, she asks about the system again. Which information may the assistant still use now? The answer depends on where it stored the manual, earlier answers and the related permissions.
The following test plan is meant for IT leadership, business departments and procurement. It applies to read-only knowledge assistants that answer from internal sources. You can use it during a vendor demo or before launching an in-house build. System W17 and the test values are fictional.
Where can company data end up after an answer?
Many assistants use retrieval-augmented generation (RAG). The application first searches for relevant passages and passes matching excerpts to a language model. The search index is a store prepared for search. It can contain text chunks, document titles and permission data. Some systems also store numerical representations of the text chunks, known as embeddings. The exact data model depends on the product.
Ask the vendor to show the path of a single file. Start with the original. Follow the file to the text chunks in the index, to the model request and to the chat. Also check whether the application caches answers and what ends up in logs, exports or backups. For each store, record the service and the person responsible. Ask who can access the data and what happens on a change or deletion.
Alongside the architecture diagram, ask to see the settings that are actually in use. A model provider may have different logging rules than the provider of the chat window. An EU hosting offer for the search index, too, initially says something about that one service only. Clarify any further data flows and, for personal data, the respective data protection roles.
Source: European Data Protection Board on controllers and processors
What is the difference between revoking access, deletion and a version change?
Change | What may still be allowed | What you check in the test |
Access revocation | Other authorized people continue to read the same file. | The affected account can neither retrieve protected content, titles and previews nor use them in a new answer. |
Deletion | Certain copies may be subject to their own retention rules. | The intended active copies and derivatives disappear. Exports and backups follow the documented procedure. |
Version change | The older version may remain in an approved archive. | When asked about the rule in force, the assistant answers from the current version and cites that source. |
These cases need separate evidence. An empty search result can also mean that a filter hides the file. Whether it was deleted is something you check in the affected stores. For personal data, the responsible body decides whether a right to erasure applies in the specific case and which exceptions apply. The technical test checks how the defined procedure is implemented.
Source: EDPB guide on the right to erasure and data subject rights
How do you test access revocation in an old chat?
1. Create a controlled test source
Create a fictional maintenance manual with the identifier W17-TEST. Give it unique content, such as “inspection interval 37 days”. Place a generally accessible manual next to it that should remain findable after the access revocation. Use three test accounts. Account A receives the permission through a group, account B never had it, account C keeps it. Account C later shows whether the block affects only the account concerned. If the solution runs several separate customer areas, add an account from another area.
2. Measure the baseline
Ask the same question with all three accounts. A and C should find the manual and name the correct version. B should not see the protected manual, neither in the answer nor in citations, previews or the content passed to the model. Check the general content for all three accounts. Without this baseline test, you may later mistake an error in the search connection for a successful access revocation.
Before the change, generate an answer in the chat for A. Keep the session open. If the application caches search results or answers, ask to be shown that the test actually reaches the storage path in use. Otherwise, the evidence for exactly this case is missing.
3. Revoke a permission and check the interval
Remove A from the group. Note when the source system denies access. Ask about W17 again in the old chat and in a new chat. Also rephrase the question without naming the identifier. Repeat the check with C. For A, the assistant must not output the protected content again or use it to answer. C should still be able to access the manual.
Record the change in the source system, the first block in the assistant and the completion of the sync with the search index. If the system cannot confirm the current permission state during that time, agree on a safe blocking rule for the test. For example, the application can temporarily suspend the affected source. The question that matters for approval is whether confidential content was still reachable during that time.
How much time passes between the steps depends on the connection. For a preview feature of the SharePoint indexer, Microsoft describes that changes to items with their own permissions and inherited changes are updated differently. Therefore, test direct permissions, inheritance and changed group membership as separate cases in your configuration. A vendor statement on how often the indexer runs does not replace this measurement.
Source: Microsoft Learn on syncing SharePoint permissions
4. Check what an existing conversation may keep
Separate the display of an old answer from its use in a new model request. Check both. Depending on the purpose, the application may have different rules for the existing history and for new answers. Define this beforehand. Content that has already been read or stored outside the application cannot be recalled by blocking the assistant. Record which stored content the operator controls and which copies are handled separately.
Also run the test with a session that was opened before the change. Login, group state, search permission and chat history can update at different speeds. What counts in the test is the permission state actually used for each request. OWASP recommends checking permissions on every request and denying access when in doubt.
Source: OWASP Authorization Cheat Sheet
5. Also log the period between change and sync
This is what the expected result could look like in the fictional log. At 10:00 you revoke A’s group permission. At 10:01 the file source verifiably denies access. At 10:02 you repeat the question in both chats. The expectation is that the assistant blocks A even if the index has not yet processed the change. At 10:07 you repeat the attempt after the sync has been confirmed. The times are example values. The test checks the actual sequence and the agreed blocking rule.
Add a failure test. IT deliberately makes the permission check service unreachable in the test environment. A tries to access W17 again. The log records whether the application blocks the affected source and shows the restriction to users in an understandable way. If the vendor can only show the chat answer, the evidence for the search and model layer is missing.
How can deletion be tested all the way to a restore?
Create a new synthetic data record for this test. Note which copies the agreed deletion process is supposed to cover. Delete the original and start the intended procedure. After the agreed period, a responsible person checks whether text chunks and related search data have been removed from the affected active stores. Depending on the system, this also includes stored answers, log extracts and derivatives. Repeat the request with a previously authorized account. In addition, check the stores instead of relying on the chat answer.
Use the document reference to find all related text chunks. A file can be split into many parts in the index. Ask how the connection identifies these parts on deletion. Microsoft, for example, describes configurations in which entries remain in the index if the source file is removed too early. The right order depends on the chosen connection.
Source: Microsoft Learn on deleting from a search index
Then restore a backup from a point in time before the deletion into an isolated test environment. Before you open this environment to test users, operations must demonstrate how it restores the current state of permissions and deletions. This can be done by rebuilding from the cleaned sources. Another option is to reapply, in a controlled way, the deletion events recorded since the backup. Then repeat the access and deletion check. A restore attempt with purely synthetic data shows whether the agreed procedure works without making deleted customer data available again.
The decisive acceptance question: After a restore, can IT show that a document deleted in the meantime and revoked permissions do not become active again? Without this evidence, the restore case remains open.
Which findings stop the go-live?
Before the test, define what counts as passed and who decides. An unauthorized retrieval into the model context should stop the launch with the affected source. The same applies if an old answer bypasses the block or if a failure of the permission check leads to uncontrolled access. An untested path remains open. The business department can limit the scope to proven sources and roles, provided IT enforces this limitation technically.
Field in the test log | Example for the fictional case |
Version and scope | Pilot version R17, maintenance source, test accounts A to C, existing and new chat. |
Change and expectation | A loses the group permission. C keeps access. The general test content remains reachable. |
Evidence | Timestamps, requesting test account, document reference, permission state used and retrieval decision. |
Result and decision | Enter after execution. Record open paths with owners, deadline and approval decision. |
Log in a way that allows a second team to repeat the test. Document references and decisions are often more meaningful than a full-text dump. If more detail is needed for a failure case, restrict access, purpose and retention period. Also define when a test is repeated, for example after changes to the identity service, the search index or chat storage.
Source: OWASP Logging Cheat Sheet
A practical example from the Cedars project
At Cedars, Wavect combined technical documentation with targeted code reviews and a clearly scoped AI review. The published case study describes how a finding turned into a prioritized measure with a criterion for re-testing. You can apply this structure to every open access or deletion test. The W17-TEST check is a standalone teaching example.
Frequently asked questions about testing AI with company data
Is it enough if the AI assistant no longer cites the file?
The source can still appear in the model context, in the preview or in the chat history. Therefore, check what is passed to the model and the visible results separately.
Which retention period applies to chat histories and backups?
Those responsible must define the period for the specific purpose, the system and the applicable requirements. The test checks the agreed period, how the affected copies are handled and the state after a restore.
What should the vendor demonstrate in a second demo?
Start with an access that is verifiably permitted. Revoke the permission, repeat the question in the open chat and look at the retrieval decision. Then ask to be shown which information is available in a new chat and to an account that is still authorized.

