Join our Newsletter — 33% off our NHI Course
Home› Guides› Microsoft 365 Copilot Audit Log Guide: Investigating Prompts,…
Guide SOC & Detection Engineering

Microsoft 365 Copilot Audit Log Guide: Investigating Prompts, Grounding Data and Oversharing

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, under the editorial direction of Lalit Choda Updated 19 November 2026 15 min read
On this page

Microsoft 365 Copilot writes a CopilotInteraction record to the Purview audit log for each interaction, and that record tells you who asked, in which app, which files and chats grounded the answer, and whether a jailbreak or cross prompt injection was flagged, but it does not hand you the prompt text. This guide is about that one record family: what is in it, how to search and keep it, and the detections and investigations you can build on it. For the wider unified audit log (collection, SIEM pipelines and non-Copilot operations) see the Microsoft 365 Unified Audit Log Guide for Detection; this page does not repeat it.

Copilot changes the shape of data access. A user who would never browse forty SharePoint sites can ask one question and receive an answer built from all of them. The audit record is how a security team sees that fan out after the fact, so it is the primary evidence source for oversharing reviews, insider investigations and prompt injection triage. Copilot itself also acts with the user's delegated permissions, so its interactions sit squarely inside identity monitoring rather than beside it.

This is an independent guide from NHI Mgmt Group, based on Microsoft's public documentation as of November 2026. It is not sponsored or reviewed by Microsoft. Product features change, so confirm settings against Microsoft's current documentation.

Key takeaways

  • Copilot interactions are logged under record type CopilotInteraction (record type 261 in the Management Activity API schema), workload Copilot, and they are included in Audit (Standard) with no extra setup when auditing is on.
  • The record carries AppHost, Contexts, AccessedResources, Messages, AISystemPlugin, AppIdentity and model details. AccessedResources is the field that answers "what did Copilot read on this user's behalf?"
  • Messages holds message IDs, an isPrompt flag and JailbreakDetected. The schema has no field for prompt or response text, so plan investigations around metadata and use other Purview tools for content.
  • XPIADetected on an accessed resource and JailbreakDetected on a message are the two built-in abuse signals. Both deserve alert rules, not just dashboards.
  • Third-party AI app records (AIAppInteraction) use pay-as-you-go billing and are kept for 180 days, so they will be missing unless someone switched that on.
  • Default Standard retention is 180 days. If Copilot investigations need a year or more, create a custom retention policy for the record type and check licensing first.

What the Copilot audit record family covers

Microsoft groups AI activity into three record types. CopilotInteraction covers Microsoft-developed Copilot apps, including Microsoft 365 Copilot, Security Copilot and others. ConnectedAIAppInteraction covers custom-built or third-party AI apps that are deployed and registered in your organisation, with the workload ConnectedAIApp. AIAppInteraction covers third-party AI apps that are not deployed in your organisation, with the workload AIApp. A fourth type, TeamCopilotInteraction, appears in Microsoft's Facilitator examples for Teams.

The operations split the same way. User interactions use the operation names CopilotInteraction, ConnectedAIAppInteraction and AIAppInteraction. Administrative changes appear with operations such as UpdateTenantSettings, CreatePlugin, DeletePlugin and EnablePromptBook. Teams Facilitator activity appears as AINotesUpdate, LiveNotesUpdate and TeamCopilotMsgInteraction.

For detection purposes, treat these as two streams. The interaction stream tells you what people and agents asked and what data was touched. The admin stream tells you who changed how Copilot behaves, which plugins exist and which prompt books are enabled. Changes in the admin stream are rarer and higher value, and they are the place an attacker with a privileged session would try to widen what Copilot can reach.

Fields that matter for investigation

Every interaction record is a standard audit record (user, time, client IP and so on) plus a CopilotEventData payload. The Copilot specific properties, as Microsoft documents them, are below.

PropertyWhat it holdsInvestigation use
AppHostThe Copilot surface used, for example BizChat, Teams, Word, Outlook, SharePoint, BingSeparates Copilot Chat sessions from in-app drafting; baselines per user
ContextsID and Type of the resource the user was in, for example docx, TeamsMeeting, TeamsChatShows where the user was when they asked
AccessedResourcesID, SiteUrl, Name, Type, SensitivityLabelId, Action, Status, PolicyDetails, XPIADetectedThe grounding data: which files, sites and items fed the answer
MessagesID, isPrompt, JailbreakDetected, Size (documented as not currently used)Counts prompts and responses; flags jailbreak attempts
ThreadIdID of the Copilot and user interaction threadGroups records into one conversation
AISystemPluginName, ID, Version of plugins usedBingWebSearch shows the public web was used
AppIdentityFor example Copilot.MicrosoftCopilot.Microsoft365Copilot or Copilot.Studio.<AppId>Separates Microsoft 365 Copilot from Copilot Studio agents
AgentId, AgentName, AgentVersionThe agent involved, where one wasAttributes activity to a specific agent build
ModelTransparencyDetailsModelProviderName, ModelName, ModelVersionRecords which model served the request; may be missing with Auto selection
DLPEvaluationDeferredBitmask: 1 prompt, 2 response, 4 grounding, 8 web groundingShows when DLP did not evaluate in line
DLPEvaluationDeferredReasonFor example Timeout, Authentication Error, Service UnavailableExplains a deferral
ClientRegionThe user's region for the operationContext for unusual locations

Two details trip up new analysts. First, AccessedResources includes a Status of success or failure and a PolicyDetails block that is populated when access was blocked or restricted by policy, so the record shows attempted grounding as well as successful grounding. Second, SensitivityLabelId is a label GUID, not a label name. Keep a lookup of your label GUIDs next to your queries or every investigation will start with a manual translation step.

What the log does not tell you

Microsoft's Copilot schema defines the message structure with only an ID, a size and the isPrompt flag. There is no prompt text or response text field in the audit record, and Microsoft's audit page does not say that content is captured there. Build your process on that basis: the audit log proves that a user asked something in a given app, at a given time, and that Copilot read particular resources to answer. It does not show what was asked.

That gap shapes three practical decisions:

  • Content review lives elsewhere. If policy allows content review during an investigation, it is a separate Purview capability with its own approvals. Agree the escalation path with legal and HR before you need it, not during an incident.
  • Grounding data is the strongest evidence. The list of resources Copilot read is objective and timestamped. Most oversharing and insider cases are proven or disproven from AccessedResources, not from the wording of a prompt.
  • Size fields are not a proxy. The Size property on messages is documented as currently not used, so do not build volume detections on it. Use counts of messages and counts of accessed resources instead.

The record also does not tell you why a user could reach a file. Copilot works within the user's existing permissions, so an alert on Copilot reading a sensitive file is often really an alert on a permission that was too broad. Route those findings to whoever owns SharePoint and OneDrive sharing, as well as to the SOC.

Searching, exporting and retaining the records

In the Microsoft Purview portal, open Audit and use the Activities (operation names) filter to select CopilotInteraction and related operations, or filter on record type and workload. Microsoft notes that filtering by AppIdentity requires exporting the Copilot results and filtering offline, so plan exports for any question about a specific agent or Copilot Studio app.

For scripted collection, the Exchange Online cmdlet Search-UnifiedAuditLog can filter on record type. The following is illustrative; check parameters against current documentation before use.

Search-UnifiedAuditLog -StartDate (Get-Date).AddDays(-7) -EndDate (Get-Date) -RecordType CopilotInteraction -ResultSize 5000

The AuditData column is JSON. Parse it once in your pipeline and store AppHost, AppIdentity, ThreadId, the count of prompt messages, the count and list of accessed resources, and any JailbreakDetected or XPIADetected values as columns. Flattening at ingest makes every later query simpler and cheaper.

Retention needs a decision, not a default. Audit (Standard) keeps records for 180 days. Audit (Premium) keeps Exchange, SharePoint, OneDrive and Entra workloads for a year by default, but other records, which includes the Copilot workload, stay at 180 days unless you create a custom policy. Retention policies can target record types, up to 50 policies per organisation, with priority from 1 (highest) to 10000. Keeping logs beyond 180 days and up to one year requires an E5 class licence for the user who generated the record, and ten years needs the ten year add-on as well. Lifetime is set when a record enters the pipeline, so a policy created after an incident will not extend records already committed. If you rely on a SIEM for longer retention, confirm that the forwarding path carries the full CopilotEventData payload. The SaaS Audit Log Retention and Licensing Guide covers the trade-offs across platforms.

Records for third-party AI apps that are not deployed in your organisation (AIAppInteraction) and some connected app scenarios are billed pay-as-you-go per record ingested and retained for 180 days. If pay-as-you-go features are not enabled, those records do not exist, so your shadow AI visibility from this source is zero by default.

Detections to build first

All queries and thresholds below are illustrative. Tune them on two to four weeks of your own data before alerting.

Jailbreak and cross prompt injection flags

Alert on any interaction where a message has JailbreakDetected set to true or an accessed resource has XPIADetected set to true. These are low volume, high signal events. For XPIA, the useful pivot is the resource, not the user: the flagged item is likely a document or email carrying injected instructions, and every other user whose Copilot reads it is exposed. Pull every interaction in the tenant whose AccessedResources includes the same ID or SiteUrl. This maps to prompt injection in the OWASP list for LLM applications.

Sensitive label fan out

Count distinct AccessedResources per user per day where SensitivityLabelId matches your highly confidential labels, and alert on users far above their own baseline or their peer group. A single prompt that grounds on many restricted files from sites the user has never opened is the classic oversharing signal. Illustrative logic: group by UserId and day, count distinct resource IDs with a restricted label, compare to the user's 30 day median.

Collection through Copilot after a risky sign-in

Join Copilot interactions to Entra sign-in risk for the same user within a short window. A session that is flagged risky and then immediately runs many Copilot Chat (BizChat) prompts that ground on finance, HR or legal sites looks like an attacker using Copilot as a search engine over the victim's data. This maps to ATT&CK Data from Information Repositories (T1213) and its SharePoint sub-technique, with the initial session under T1078 Valid Accounts.

Policy blocks and DLP deferrals

Count accessed resources with Status of failure and a populated PolicyDetails. A spike for one user means they are repeatedly asking for content that policy blocks, which is worth a conversation even when nothing leaked. Separately, track DLPEvaluationDeferred: a sustained run of deferrals with reasons such as Timeout or Service Unavailable means DLP was not evaluating prompts or grounding in line during that period, and your coverage report should say so.

Web grounding on sensitive contexts

Where web search is allowed, interactions whose AISystemPlugin ID is BingWebSearch used the public web. Combine that with a Contexts type such as a labelled document or a Teams meeting to find cases where queries derived from internal material may have gone to the web. Treat it as a review queue rather than an alert.

Admin and agent changes

Alert on UpdateTenantSettings, CreatePlugin, DeletePlugin and EnablePromptBook outside change windows, and on the first appearance of a new AgentId or Copilot.Studio.<AppId> value in interaction records. A new agent appearing in the interaction stream without a matching change ticket is the Copilot equivalent of a new OAuth app. The Securing Microsoft Copilot Studio Agents Guide covers the controls that should sit in front of that.

Running an oversharing investigation

A typical trigger is a user reporting that Copilot showed them something they should not have seen, or a label fan out alert. Work it in this order.

  1. Scope the conversation. Find the interaction by user and time, then pull every record with the same ThreadId. Note the AppHost and Contexts.
  2. List the grounding data. Expand AccessedResources across the thread. Record each SiteUrl, Name, label and Status. This is your evidence table.
  3. Explain the access. For each sensitive resource, check why the user had permission: a broad sharing link, an "everyone except external users" grant, inherited site membership. This step is where most root causes are found.
  4. Measure exposure. Search for other users whose interactions accessed the same resources in the retention window. One overshared site usually shows up in many users' grounding data.
  5. Fix and verify. Remove the broad permission, apply or correct the label, then confirm that new interactions no longer list the resource, or list it with a failure status and policy details.

The same steps support insider investigations: the evidence table shows what the person caused Copilot to read, which is often easier to explain to HR than raw file access events. For the common permission patterns behind these findings see Top 10 Microsoft 365 Copilot and AI Assistant Oversharing Risks.

Agents, plugins and non-human callers

Copilot Studio agents and connected AI apps carry identities of their own. The AppIdentity pattern distinguishes Microsoft 365 Copilot from Copilot Studio agents (by app ID), connected apps (by Entra app ID) and SaaS AI apps. Use it to build an inventory: every distinct AppIdentity and AgentId seen in the last 30 days, the users who invoked each, and the sites each grounded on. Compare that inventory with your approved agent list each month.

Agents are where non-human identity risk meets Copilot. An agent that grounds on a wide set of sites for every user who invokes it is effectively a shared data access path, and its owner may not be in the security team. Record which agent versions were in use with AgentVersion, so that when an agent is changed you can show which interactions happened before and after. Pair this with the identity controls described in the Microsoft 365 Copilot Security Deep Dive.

Measuring coverage

  • Percentage of licensed Copilot users with at least one CopilotInteraction record in the last 30 days, compared with licence reports. A large gap suggests a logging or forwarding problem.
  • Share of records in your SIEM with a parsed AccessedResources array, against the share in Purview exports.
  • Number of distinct AppHost values seen, against the surfaces you have enabled.
  • Days of Copilot records available, against the retention you think you have.
  • Hours with any DLPEvaluationDeferred records, reported monthly.

Common failure patterns

  • Expecting prompt text. Teams design an investigation runbook around reading prompts, then discover the audit record holds IDs only. Design around grounding data.
  • Not parsing AuditData. Copilot fields stay buried in a JSON string, so nobody queries AccessedResources and the most valuable field goes unused.
  • Assuming Premium retention covers Copilot. The one year default under Premium applies to Exchange, SharePoint, OneDrive and Entra workloads. Copilot records stay at 180 days without a custom policy.
  • Ignoring XPIA as a resource problem. Analysts close the alert on the user and leave the poisoned document in place for the next user.
  • Raw label GUIDs. Without a lookup, nobody notices that a fan out alert involved the most restricted label.
  • No pay-as-you-go decision. Teams assume third-party AI app use is logged when the billing feature that enables it was never switched on.
  • Treating Copilot alerts as SOC-only. Most findings are permission hygiene problems that need a SharePoint owner to fix.

Practitioner checklist

  • Confirm auditing is on and CopilotInteraction records appear for a test user in each enabled AppHost.
  • Parse CopilotEventData at ingest into columns for AppHost, AppIdentity, ThreadId, accessed resources, labels and abuse flags.
  • Maintain a sensitivity label GUID to name lookup next to your queries.
  • Alert on JailbreakDetected and XPIADetected, and pivot XPIA alerts to every user who accessed the same resource.
  • Build a per-user baseline for restricted label grounding and alert on large deviations.
  • Alert on Copilot admin operations and on first sight of a new agent or Copilot Studio app identity.
  • Create a retention policy for the Copilot record type if investigations need more than 180 days, and check licences for the users concerned.
  • Decide explicitly whether to enable pay-as-you-go logging for third-party AI apps.
  • Agree the escalation path for content review with legal and HR before an incident.
  • Report coverage and DLP deferral hours monthly.

Standards and references

Related NHI Mgmt Group resources: Okta System Log Detection Guide · Microsoft 365 Unified Audit Log Guide for Detection · Microsoft 365 Copilot Security Deep Dive · Entra ID Audit Log Detection Guide

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick both boxes to continue.