An AI assistant that can query your financial, customer, and operational data needs an audit trail. Regulated industries (healthcare, financial services, defense, regulated SaaS) cannot adopt AI tooling without answering "who accessed what, when, and from which application."
CorpusIQ solves this with structured per-tool-call logging. Every time a model calls a connector, the call is logged. This post explains what is logged, how, and why the format matters for compliance.
Why "conversational AI logs" are not enough
Some AI vendors log conversations. That is useful for debugging and insufficient for compliance.
Conversation logs answer: "what did the user ask, what did the AI say?"
Audit logs need to answer: "which external systems did the AI touch, on whose authority, through which application, at what time, with what query parameters?"
The two are different. Conversation logs are flat text. Audit logs are structured events.
Without structured logs, an auditor who asks "did any user pull customer data from our production database last Tuesday" has no way to answer without grepping thousands of conversation transcripts. With structured logs, the answer is a single query.
The CorpusIQ log schema
Every tool call emits a single structured event with these fields:
- event:
tool_called - user_id: CorpusIQ user identifier, pseudonymous (not the user's email)
- tenant_id: For Business tier with multiple users
- tool_name: e.g.,
quickbooks_get_balance_sheet,shopify_list_orders - session_id: Unique per conversation
- request_id: Unique per tool call, used for correlation
- source_app:
claude_web,claude_desktop,chatgpt,perplexity,api - timestamp: ISO 8601 UTC
- duration_ms: How long the tool call took
- status:
success,error, orrate_limited - error_class: If status is error, the error category (not the full message)
- query_text: Operational query text used for the tool call
- outcome_summary: Bounded success or error outcome, not the full connector payload
Operational logs can include query text, per-user tool-call metadata, and bounded outcome summaries. Direct MCP does not retain raw customer files or full connector response payloads in that log. Full AI-client conversation handling remains governed by the selected provider and plan.
Where logs live
CorpusIQ's logs land in Azure Log Analytics workspace (ContainerAppConsoleLogs_CL) via the standard Azure Container Apps logging pipeline.
Azure Log Analytics provides:
- Structured query language (KQL) for ad-hoc audit queries
- Alerts on patterns (e.g., notify on error rate spikes)
- Role-based access control for audit log viewers
- Encryption at rest
Retention is currently 30 days in the queryable window, with export support for longer-term retention in customer-managed storage.
For customers who need SIEM integration, logs can be streamed to Azure Event Hubs and from there to Splunk, Datadog, or any SIEM that consumes Event Hubs.
What auditors actually ask
Real questions that structured logging answers. Sample queries in KQL-style pseudocode.
"Which users queried QuickBooks data in March?"
ContainerAppConsoleLogs_CL
| where event == "tool_called"
| where tool_name startswith "quickbooks_"
| where TimeGenerated between (datetime(2026-03-01) .. datetime(2026-04-01))
| summarize count() by user_id
"How many tool calls did user X make in the last 24 hours, and which connectors did they touch?"
ContainerAppConsoleLogs_CL
| where event == "tool_called"
| where user_id == "user_abc123"
| where TimeGenerated > ago(24h)
| summarize count() by tool_name, source_app
"Were there any tool call errors in the last week, and which connectors produced them?"
ContainerAppConsoleLogs_CL
| where event == "tool_called"
| where status == "error"
| where TimeGenerated > ago(7d)
| summarize error_count=count() by tool_name, error_class
Each query returns in seconds. That is the operational difference between audit-ready logging and unstructured conversation logs.
Which compliance regimes this supports
Structured tool-call logs directly support audit trail requirements in several frameworks.
SOC 2: CC6.1 (logical access controls) and CC7.2 (system monitoring) both require audit trails of data access. CorpusIQ's logs provide access trail at the application layer.
GDPR: Article 30 requires records of processing activities. Tool call logs document when and how data was accessed, supporting records of processing.
HIPAA (for CorpusIQ customers in healthcare-adjacent spaces): the Security Rule's audit controls (164.312(b)) require logging of information system activity. CorpusIQ's logs cover the tool call surface.
Government contracts under DFARS or FedRAMP: requirements vary, but all require audit trails of system access. Structured logs are the minimum.
None of these frameworks are satisfied by logging alone. But logging is necessary for all of them, and the quality of the logging determines how much work the customer has to do to satisfy auditors.
What structured logging does not do
Three things.
It does not prove the AI made correct decisions. Logs show what was called; they do not evaluate whether the call was appropriate.
It does not prevent unauthorized access. Logs detect after the fact. Authorization controls (OAuth scopes, user authentication) prevent.
It does not replace conversation logging. Some compliance situations require knowing what the AI said, not just what it called. For those, conversation logs (if the client application retains them) are separate.
How this matters for enterprise adoption
Enterprise security reviews for AI tooling ask three questions:
- What data does the tool access? (OAuth scopes)
- What does the tool do with the data? (Storage policy)
- How do we know what actually happened? (Audit trail)
CorpusIQ answers 1 with read-only scopes, 2 with documented direct-MCP, log, optional-index, and compliance-record lifecycles, and 3 with structured logging.
Tools that cannot answer all three end up in a procurement purgatory that lasts months. Tools that answer all three clear the review faster.
See also
FAQ
How long are logs retained?
Currently 30 days queryable in Azure Log Analytics, with plans to extend to 365 days. Logs are structured and exportable for longer-term retention in customer-managed storage.
What data is contained in the logs?
Operational logs may include query text, per-user tool-call metadata, and bounded outcome summaries for up to 30 days. Direct MCP does not retain raw customer files or full connector response payloads.
Can I export logs for my own SIEM?
Yes. Logs can be exported to customer-managed storage or SIEM via Azure Event Hubs. Contact support for integration details.
Does this satisfy SOC 2 audit requirements?
Audit trail requirements are one part of SOC 2. CorpusIQ's logging supports that control. The full SOC 2 control set covers more than logging; CorpusIQ maintains a SOC 2 aligned posture and is designed for audit expectations. For current certification status, contact sales.
