The AI Assistant Answered a Question Nobody Should Have Asked
The employee asked Microsoft 365 Copilot for a summary of a routine project update.
The answer included something the employee had never requested: confidential financial information.
“How did it know to look there?” the analyst asked.
Agent Foskett opened the source document.
“I don't think the employee asked it to,” he said. “I think the document did.”

The document was data, not an instruction
An AI assistant can encounter instructions embedded in retrieved content. The investigation must separate the user's legitimate request, untrusted source material, and the assistant's observed response.
The question was ordinary
The assistant produced a useful summary. Then, unexpectedly, it included a paragraph about an internal finance forecast that did not belong in the project briefing.
“That is a strange footnote,” the project manager said.
Agent Foskett agreed. The user had not requested the finance figures.
The sentence that did not belong
It looked like an internal editorial note. But it was not an instruction from the user or a trusted system. It was untrusted document content attempting to redirect the assistant.
In this fictional case, the passage had been added by someone with document-editing access. The team did not assume malicious intent until they checked version history, ownership and related activity.
A prompt injection is not a permission bypass
Indirect prompt injection happens when instructions embedded in external or lower-trust content attempt to influence an AI system’s behaviour.
That does not automatically mean Copilot can access information the user is forbidden to see. Microsoft 365 Copilot is designed to work within the user’s existing access permissions. In this scenario, the sensitive forecast was already accessible through overly broad SharePoint permissions. The injected passage exploited that exposure by steering the answer toward it.
Two problems were involved: an untrusted instruction in a document, and access to information broader than the employee needed.
What the assistant actually did
The response referenced the finance forecast and contained details the user had not asked for. That supported an investigation into unintended disclosure. It did not, by itself, prove that a specific sentence in the document caused every part of the answer.
“The story sounds obvious,” Agent Foskett said. “Our job is to prove the steps.”
First hunt: who accessed the source document?
OfficeActivity table may contain SharePoint file operations. The example below searches for activity involving a known document name. Available operations and fields depend on tenant audit configuration and ingestion.Important: a file-access event is not a definitive record of every source Copilot retrieved or every piece of content used in an answer.
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
let TargetFile = "Project-Status.docx";
OfficeActivity
| where TimeGenerated > ago(14d)
| where OfficeWorkload == "SharePoint"
| where OfficeObjectId contains TargetFile
| project TimeGenerated, Operation, UserId,
OfficeObjectId, ClientIP, UserAgent
| order by TimeGenerated ascFollow the document version history
They also checked whether the file had been shared externally, whether a guest account had editing rights, and whether an automation or integration could update it.
A document’s author field was not enough. The investigation needed the actual version trail and audit evidence.
Second hunt: identify unusual SharePoint sharing activity
OfficeActivity. Operation names differ across workloads and may change; validate the events present in your environment before interpreting the results.- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
OfficeActivity
| where TimeGenerated > ago(30d)
| where OfficeWorkload == "SharePoint"
| where Operation has_any (
"Sharing", "AnonymousLink", "SecureLink", "AddedToGroup")
| project TimeGenerated, Operation, UserId,
OfficeObjectId, ClientIP
| order by TimeGenerated descThe finance document was not supposed to be there
That mattered. The answer did not establish a technical bypass of access controls. Instead, it highlighted an existing permissions problem, made visible by an AI-generated response.
“The assistant found a door that was already open,” Agent Foskett said. “The document told it which room to enter.”
Third hunt: review directory permission changes
AuditLogs table can provide useful context where the relevant audit stream is ingested. This is not a substitute for checking SharePoint site permissions and Microsoft 365 group membership directly. It helps identify changes that may have broadened access.- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
AuditLogs
| where TimeGenerated > ago(30d)
| where Category =~ "GroupManagement"
| where ActivityDisplayName has_any ("Add member", "Update group")
| project TimeGenerated, ActivityDisplayName,
Result, InitiatedBy, TargetResources
| order by TimeGenerated descCould this have been a harmless editorial note?
The wording, location and timing of the passage were suspicious, but intent still required corroboration. The team treated the document edit as a lead and compared it with the response, audit history and user’s account of the session.
What the logs could not tell them
Where interaction records were unavailable, the investigators preserved the user-visible response and other lawful, available evidence rather than inventing a hidden trace.
Never confuse missing telemetry with a clean bill of health.
Reconstruct the incident
Contain the problem, not just the answer
They introduced stronger document governance, least-privilege sharing, owner review for sensitive sites, monitoring for unexpected changes and staff guidance on treating AI outputs as material requiring verification. They also assessed available Copilot security controls and Microsoft Purview protections appropriate to their licences and deployment.
The lesson
Retrieved content is evidence to evaluate—not a new authority to obey.
Continue investigating
Final thought
“No,” Agent Foskett replied.
“Then why was it in the answer?”
Agent Foskett pointed to the document’s version history.
“Because someone else wrote a question inside the evidence.”
He closed the file.
The Logs Already Knew! 🔎

