Skip to content

Copilot Reports and Prompt History

Sam Betts edited this page Nov 12, 2026 · 4 revisions

Copilot → Copilot Reports and Prompt History

Fuller audit-field capture

Expanded in Stable build 1807.

The importer previously downloaded and parsed the full Copilot audit record but stored only part of it. It now keeps the rest as well. No new API call, permission or import-cycle cost — this is data that was already being fetched and then discarded:

Now stored Previously
Every interaction context Only the first file context and the first meeting context
Accessed-resource Action and listItemUniqueId Dropped
AI system plugins that grounded the answer Dropped
Prompt messages, and message sizes Response message IDs only
AI model provider and version Model name only
Thread ID, client region, Copilot log version Dropped

Rows imported earlier are not filled in. Office 365 Management Activity API content is only retrievable for about 7 days, so these fields are populated for newly imported interactions only. Interactions imported before you upgrade keep NULL values and no child rows, and there is no way to recover them. The longer you leave the upgrade, the larger the gap in the middle of your history. The Copilot audit backfill doesn't change this: it skips interactions that are already in the database with their Copilot details, so it doesn't fill these fields in.

Two consequences worth planning for:

  • copilot_event_messages roughly doubles in row count, because prompt rows are now imported alongside response rows (payloads typically carry one of each). Message text is still never stored.
  • copilot_event_accessed_resources can gain rows for interactions it already covered, because a resource that was both read and written in one interaction is now two rows rather than one collapsed row.

Copilot usage reports

Added in Stable build 1807. Config flag: GraphCopilotUsageReports. Off by default.

Separate from everything above. The audit-feed import describes interactions we observed; this one pulls Microsoft's own official Copilot usage reporting from Graph — the same figures the Microsoft 365 admin centre shows, which is what customers will compare our numbers against.

Three reports are imported into three tables:

Report Table
Copilot user-count summary copilot_user_count_log
Copilot user-count trend copilot_user_count_log
Per-user Copilot usage detail copilot_usage_user_activity_log

Plus copilot_usage_report_import_log, one row per import run, so the Health page can show whether the last run succeeded.

Microsoft's per-user Cowork usage report is not imported. It is only a page in the Microsoft 365 admin centre (Copilot → Cowork → Usage), with a CSV export, and has no Graph API. Builds 1833 to 1846 tried to import it from a Graph function that doesn't exist; see Known issues. Copilot Adoption counts Cowork from the audit feed instead, as interactions.

  • Permission: Reports.Read.All, admin-consented.
  • Global cloud only. Outside the global cloud these endpoints return 404, which the importer tolerates and records as the reason.
  • A missing or unconsented grant now fails the import. Previously a 403 was swallowed and recorded as an empty day, which read as "this tenant has no Copilot licences" and suppressed retry for 24 hours. It now surfaces the HTTP status on the Health page instead. A genuinely empty report is still a clean success.
  • Retention: these tables had no age bound before Stable build 1807 and grew forever. Clean Old Data Data.sql now purges them in 10,000-row batches. That script is not deployed by the installer — see System performance → Clean-up script for growing data.

Copilot AI interaction history (prompt history)

Added in Stable build 1807. Config flag: CopilotInteractionHistory. Off by default, and deliberately harder to enable than the others.

Imports Copilot prompt history from /copilot/users/{id}/interactionHistory/getAllEnterpriseInteractions.

What is stored — and what is not

Never stored: prompt text, response text.

Stored: derived statistics per interaction — body character and word counts, attachment / link / mention / context counts, response latency, app class, conversation type, locale, device.

Additionally stored when Cognitive Services is configured: a detected language, a positive-sentiment confidence score (0.0–1.0), and extracted keywords.

This is a new egress path for prompt content. Enabling cognitive enrichment sends prompt text to Azure AI Language for analysis. The extracted keywords that come back are stored, and a keyword can amount to a whole short prompt. Decide this deliberately — see Security Model → Copilot prompt content.

Three prerequisites, all required

  1. AiEnterpriseInteraction.Read.All — application permission, not requested or granted by the installer. An Entra administrator must add it to the runtime app registration and grant admin consent explicitly.
  2. The M365_COPILOT_BUSINESS_CHAT service plan on each user. Users without it return nothing.
  3. A scope. The endpoint is one HTTP call per user. At the ~200,000-user design target an unscoped run means 200,000 Graph calls per cycle — point it at a pilot group with UserGroupsFilter. UserGroupsFilter is an optional narrowing rather than a precondition, so leaving it unset runs tenant-wide. The import is also capped per cycle as a backstop, and resumes where it left off.

What it powers

The Prompt insights report (Insights → Copilot → Prompt insights) shows three more visuals when Cognitive Services is configured: a keyword word cloud, weekly prompt sentiment, and a prompt-language breakdown. Without it the three are hidden and the page explains why.

Since Stable build 1860 (PR #866), readers without See PII don't see prompt phrases or languages used by fewer than 5 people. See Portal permissions → Small groups withheld from readers without See PII.

Tables

copilot_interactions, copilot_interaction_sessions, copilot_interaction_keywords, copilot_interaction_user_watermarks, plus lookups (copilot_interaction_types, copilot_interaction_app_classes, copilot_interaction_conversation_types, copilot_interaction_locales, copilot_interaction_devices) and copilot_interaction_import_log.

copilot_interaction_user_watermarks records how far the import got per user and is deliberately not cleaned by the retention job — deleting it would make the next run re-scan every user's whole backfill window.

Database Tables

All Copilot data is stored in the tables documented in the Database Schema page. The key tables are:

Table Purpose
copilot_chats Core interaction record: app host, agent, credit estimate, thread ID, conversation ID, client region, log version. Links to audit_events.
copilot_chat_duplicates The audit records that are an extra record of a turn counted on another record — see how a Copilot Studio agent's turns are counted.
copilot_event_files File context: name, extension, URL, site. First file context only.
copilot_event_meetings Meeting context: links to online_meetings. First meeting context only.
copilot_event_contexts Every context on the interaction, unresolved and verbatim.
copilot_event_context_types Lookup for context types (docx, TeamsMeeting, …).
copilot_agents Agent definitions: name, agent ID, and whether the agent is customer-built (is_custom_agent: 1 customer-built, 0 Microsoft's, NULL not known — see Agent type).
copilot_event_accessed_resources Resources Copilot referenced, with type, action, list item ID, sensitivity label and the cross-prompt injection (XPIA) flag.
copilot_event_accessed_resource_actions Lookup for the action performed against a resource (Read, …).
copilot_event_messages Prompt and response messages: ID, size, which of the two it is, and the jailbreak flag. No message text.
copilot_ai_models / copilot_event_ai_models AI models used per interaction, with provider and version.
copilot_ai_system_plugins / copilot_event_ai_system_plugins Plugins/connectors that grounded each answer.
sensitivity_labels Shared sensitivity label lookup.

Return to Copilot · All topics in this guide

Previous: Copilot Historical Evidence Repair · Next: Copilot DLP and Governance

Start here

Copilot analytics

Using the portal

Install & configure

Beyond Copilot

Operate

Upgrading from an older build

Reference

Project

Clone this wiki locally