Repository navigation
Database Copilot Schema
Database Schema → Database Copilot Schema
These tables are specific for Microsoft 365 Copilot activity tracking. See Copilot analytics for what each feed collects and how to turn the optional ones on.
Requires the Copilot flag in ImportJobSettings (off by default), which subscribes the importer to the Audit.General feed. No extra Entra permission beyond the ActivityFeed.Read the activity import already holds.
| Table Name | Comments |
|---|---|
| copilot_chats | Raw Copilot audit records: app host, agent, thread ID, client region, log version and credit estimates. Denormalised user_id/time_stamp support reports. Nullable conversation_id was added in 1852 as metadata-only DDL, not a historical backfill. |
| copilot_chat_duplicates | Extra records of a counted turn: event_id, timestamp, counted_event_id and reason. Supported runtime twins use reason 1; 1854 restores unsupported old timing-only reason-2 mappings. Raw records/resources remain; see turn evidence. |
| copilot_event_files | Copilot events related to files – file extension, file name, URL, and site lookups. First file context only. |
| copilot_event_meetings | Copilot events related to online meetings – links to online_meetings table. First meeting context only. Since Stable 1856 (PR #768): migration 202610221500003_UniqueOnlineMeetingIds moves links that point at a duplicate meeting row onto the row it keeps for that meeting. |
| copilot_event_contexts | Every context on the interaction, unresolved and verbatim — not just the first file or meeting. |
| copilot_event_context_types | Lookup for context types (docx, TeamsMeeting, …). |
| copilot_agents | Copilot agent definitions – name, agent ID, and is_custom_agent: 1 customer-built, 0 Microsoft's own, NULL not known. See Copilot – Agent type. Since Stable 1856 (PR #768): migration 202610221500001_CopilotAgentNameAndFlagRecency adds name_seen_utc and flag_seen_utc (datetime2(3)), the audit time of the newest record that carried the stored name or flag, and name_is_fallback (bit), 1 when the stored name is a Copilot Studio schema name rather than a display name. NULL in all three means not known, as in every row stored before the migration. |
| copilot_event_accessed_resources | Junction table linking copilot events to accessed resources with type, action, list item ID, name, URL, and sensitivity label. |
| copilot_event_accessed_resource_actions | Lookup for the action performed against a resource (Read, …). A resource both read and written in one interaction is now two rows rather than one collapsed row. |
| copilot_event_accessed_resource_ids | Lookup table for accessed resource IDs. |
| copilot_event_accessed_resource_names | Lookup table for accessed resource names. |
| copilot_event_accessed_resource_site_urls | Lookup table for accessed resource site URLs. |
| copilot_event_accessed_resource_types | Lookup table for accessed resource types. |
| sensitivity_labels | Sensitivity label IDs lookup table. Shared across event types. |
| copilot_event_messages | Prompt and response messages – message ID, size, and which of the two it is. No message text. |
| copilot_ai_models | AI model names lookup table (e.g. deep reasoning models), with provider and version. |
| copilot_event_ai_models | Junction table linking copilot events to AI models used in generating responses. |
| copilot_ai_system_plugins | Plugins/connectors that grounded an answer – ID, name and version. A version change is stored as a new row rather than rewriting the existing one, so history stays accurate. |
| copilot_event_ai_system_plugins | Junction table linking copilot events to the plugins that grounded them. |
| online_meetings | Online meeting definitions – name, meeting ID, and creation date. Since Stable 1856 (PR #768): builds before 1856 stored a meeting again with every import batch that mentioned it. Migration 202610221500003_UniqueOnlineMeetingIds removes those copies, keeping one row per meeting_id, narrows meeting_id to nvarchar(850) and makes it unique (UX_online_meetings_meeting_id); see Upgrade to Build 1856. |
Microsoft's own official Copilot usage figures, from the Graph reporting API — the same numbers the Microsoft 365 admin centre shows. Config flag GraphCopilotUsageReports, off by default; needs Reports.Read.All.
| Table Name | Comments |
|---|---|
| copilot_user_count_log | Copilot user-count summary and trend reports. |
| copilot_usage_user_activity_log | Per-user Copilot usage detail. |
| copilot_usage_report_import_log | One row per import run, so the Health page can show whether the last run succeeded. |
| cowork_usage_user_activity_log | Always empty. Created for a per-user Cowork usage report not supplied by the supported Graph API. The attempted import was removed in Stable 1849; the table remains for schema compatibility. See Known issues. |
Retention: these tables had no age bound before and grew forever.
Clean Old Data Data.sqlnow purges them in 10,000-row batches. That script is not deployed by the installer — see System performance → Clean-up script for growing data for what it deletes and how to run it.
Derived statistics about prompts. Config flag CopilotInteractionHistory, off by default; needs AiEnterpriseInteraction.Read.All, which the installer does not request. Prompt text and response text are never stored.
| Table Name | Comments |
|---|---|
| copilot_interactions | One row per interaction: body character/word counts, attachment / link / mention / context counts, response latency, app class, conversation type, locale and device. Plus, when Cognitive Services is configured, a detected language and a positive-sentiment confidence score (0.0–1.0). |
| copilot_interaction_sessions | Conversation/session grouping for the interactions above. |
| copilot_interaction_keywords | Keywords extracted by Azure AI Language. Only populated when Cognitive Services is configured. |
| copilot_interaction_user_watermarks | How far the import got per user. Deliberately not cleaned by the retention job — deleting it would make the next run re-scan every user's whole backfill window. |
| copilot_interaction_types | Lookup. |
| copilot_interaction_app_classes | Lookup. |
| copilot_interaction_conversation_types | Lookup. |
| copilot_interaction_locales | Lookup. |
| copilot_interaction_devices | Lookup. |
| copilot_interaction_import_log | One row per import run, for the Health page. |
Privacy: 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. See Security Model → Copilot prompt content.
| Table | Stored facts |
|---|---|
copilot_prompt_taxonomies |
Immutable content-addressed version and administrator category definitions; no prompt content |
copilot_prompt_classifications |
One interaction-linked fact: stable category ID, taxonomy version and nullable administrator-authored human-mode annotation |
Processing opt-in/configuration and the latest ten run counters are in AnalyticsState / PromptCategories, not a SQL run-log table. Prompt text, model rationale and arbitrary model output are not persisted. The fact FK cascades with interaction erasure; current retention/user-purge SQL also removes facts first. Taxonomy definitions are retained to interpret historical versions. See Prompt categories.
| Table | Purpose |
|---|---|
copilot_agent_catalog_import_log |
Catalog run status, start/completion time, counts and bounded error |
copilot_agent_packages |
Per-completed-snapshot documented package metadata/aggregate metrics; presence flag distinguishes explicit null last-use from missing usage |
copilot_agent_package_elements |
Documented package element type/ID relationships within that snapshot |
An incomplete run does not replace the last completed snapshot. Catalog counts are not per-person analytics or billed usage, and unverified package/audit IDs are not owner/billing joins. See Agent 365 package catalog.
Created empty by 202610230900001_AddCopilotCostPreview (Stable 1856), whether or not you turn the preview on, and filled only by the optional Copilot credit history collector. Its history is kept until a DBA purges it explicitly with dbo.copilot_cost_purge_preview, a dry-run-first procedure the same migration creates; see Database upgrade and explicit purge.
| Table | Comments |
|---|---|
| copilot_cost_observations | One row per person (Entra object ID) per observation date: when it was read, its quality, the source month and the period status. user_id links to users when the person is an in-scope user. |
| copilot_cost_services | For each observation, one row per service category: consumed quantity and unit, the selected spending policy, whether it was allowed and why, and the limits, capacity and remaining amounts Microsoft returned. |
| copilot_cost_unevaluated | For each observation, the service categories Microsoft didn't evaluate, with the reason. |
| copilot_cost_history | A copy of each observation bundle as it was published (bundle, JSON), one row per publication. |
| copilot_cost_context | Tenant and policy context documents read during a run; not per person. |
| copilot_cost_runs | One row per collection run and inventory date: inventory progress, the worker's lease, the last attempt and completion, and the outcome. |
| copilot_cost_work | For each run, one work item per directory user: attempts, next attempt and outcome. |
| copilot_cost_pages | For each run, the Microsoft Graph pages queued for the directory inventory and the context reads. |
| copilot_cost_control | A single row: the collector's current generation, and whether collection is blocked. |
| Table Name | Comments |
|---|---|
| copilot_adoption_reclaim_exclusions | People an administrator has excluded from Copilot Adoption's licence-reclaim recommendations, for cases the data can't detect, such as long-term leave, part-time roles, service accounts and shared mailboxes: user_id, reason, an optional note, excluded_by, excluded_utc and an optional review_after_utc. An exclusion applies until review_after_utc passes, or indefinitely if that is empty; the newest one that applies wins. There is no portal page for it: maintain it with SQL. Created by 202609131940001_CopilotReclaimEligibilityInputs (Stable 1832). |
Return to Database Schema · All topics in this guide
Previous: Database Collaboration Schema · Next: Database Reporting and Operations Schema
- Copilot analytics overview
- Copilot Adoption user guide
- Copilot Adoption setup (admins)
- Work Trend Index
- Copilot investment
- Copilot spend
- Agent costs
- Prompt categories
- Copilot credit history (preview)
- Agent 365 package catalog
- The Copilot data in depth
- Prerequisites
- App registrations setup
- Install with the installer
- Verify the deployment
- Security & permissions model
- Private endpoints (optional)
- Certificate authentication (optional)
- Manual installation
- Activity & usage analytics (Power BI)
- SharePoint page tracking