Implementation Guide | Healthcare

    Logging Copilot Studio agent tool calls and agent flows as HIPAA audit evidence

    HIPAA 164.312(b) requires mechanisms that record and examine activity in systems that contain or use ePHI. For Copilot Studio agents, that means producing a record of each tool call, connector action and agent flow run that shows who or what acted, on which data, when, and with what outcome. Start from those evidence requirements, test each native log source against them, record data categories rather than PHI values where possible, and treat the policy applied and the decision outcome as the gaps most likely to remain.

    What 164.312(b) asks for

    The audit controls standard reads: implement hardware, software, and/or procedural mechanisms that record and examine activity in information systems that contain or use electronic protected health information. It is a required specification, not an addressable one. The Security Rule also requires procedures to regularly review records of information system activity, such as audit logs, access reports and security incident tracking reports. Recording is therefore only half the obligation. The records must be reviewable.

    The regulation does not prescribe a log format, field list or tool. That leaves the design to you, and an auditor will judge whether your records let someone reconstruct what happened. ONC certification criteria for health IT do not apply directly to a covered entity's own deployment, but they are useful reference points: tamper detection, restricted ability to disable auditing, and reports for a defined period that can be sorted and filtered.

    One regulatory item to track as of November 2026: the January 2025 HIPAA Security Rule proposal would extend activity records to persons and technology assets in relevant systems. It is a proposal, and current requirements remain those in the existing rule text. Even so, designing the agent as a distinct actor in your audit trail is sound practice now.

    Map agent activity to audit evidence

    Define the audit data set per event type before choosing any log source. The goal is a record that supports reconstructing the sequence of actions, which means identity, action and timestamp must be linkable across separate systems. A shared correlation identifier carried through each step is the simplest way to achieve this.

    • Tool call: Agent identity, invoking user, tool name, target system, data category touched, timestamp, outcome and a correlation ID. Inputs and outputs only where your compliance team has decided they are needed.
    • Connector action: The connection or service identity used, the operation performed, the system acted on, timestamp and result status.
    • Agent flow run: Flow identifier and version, trigger source, steps executed, run start and end times, and success or failure status.
    • Policy decision: The policy or rule applied to the action and the outcome: allowed, redacted, blocked or escalated, plus the approver where a human decided.
    • Logging configuration change: Who changed or disabled logging, what changed and when. This supports tamper-resistance arguments.

    Test native sources against audit questions

    Telemetry for a Copilot Studio deployment is spread across Copilot Studio analytics and transcripts, Dataverse and Power Platform logs, Microsoft Purview audit, Application Insights and Power Automate run history. Treat each as a candidate for one part of the record, not the whole record. Build a matrix with the event types above as rows and the sources as columns, and mark each cell as captured, partially captured or not captured, based on what you verify in your own tenant.

    For every source, ask the same questions. Does it record that an event occurred, or also its inputs and outputs? Which identity does it attribute the action to: the end user, the agent or a service account? Are timestamps consistent enough to order events across sources? How long is the record retained, and who can delete or alter it? Can it be exported as a report for a defined period?

    The matrix should also separate two things that are easy to conflate. Configuration records show what an agent was permitted to do: which tools, connectors and flows it could reach. Runtime records show what it did. Permission settings are not evidence of use, and run history is not evidence of authorization. An auditor will want both, linked, and the link is rarely automatic.

    Handle PHI in logged content

    Tool call inputs and outputs are where PHI is most likely to appear in logs. Once a payload containing PHI is written to a transcript, telemetry store or run history, that store becomes a place where ePHI lives and needs its own access controls, retention decisions and review. Capturing everything for the sake of completeness can create a second exposure surface that is larger than the one you are auditing.

    A more defensible default is to log the fact and metadata of access rather than the content. ONC's guidance illustrates the idea: recording that a user accessed a patient's medication list is sufficient, without also recording the specific medication. Applied to agents, a record that states the agent read a medication list for a given patient identifier, at a given time, under a given policy, may satisfy review needs without storing the values. This is a design inference, not a HIPAA requirement, so confirm with your compliance team what your auditors will accept.

    Two further practices help. Redact or tokenize sensitive fields before they are written to any log, not after. And document what is captured, what is deliberately excluded to limit PHI, and the review cadence. A CMS memo on Microsoft 365 Copilot makes a related point: limit PII and PHI in prompts and responses to the minimum necessary, and recognize that output can persist beyond the user's session. It is an internal CMS directive, but the reasoning carries over to agent payloads.

    Integrity, retention and review

    Audit records are only useful if they can be trusted. ONC criteria call for the ability to detect whether an audit log has been altered, and for restricting the ability to disable auditing to a limited set of users. Apply both ideas to every source in your matrix. List who holds the roles that can change or turn off logging, test whether alteration is detectable, and consider copying records to a write-restricted store you control.

    Set retention per source, then compare the result with your documented retention policy. A source that expires records sooner than your policy requires leaves a gap regardless of how detailed it is. Where a native source cannot meet the period, export on a schedule.

    Finally, build for review. The information system activity review requirement means someone must actually examine these records. Define a cadence, consider automating detection of unusual agent behavior, and confirm you can produce a filtered report for a specific time period without assembling it by hand during an audit.

    Gaps that commonly remain

    After completing the matrix, expect gaps in four areas. First, payload detail: a source may show that a flow ran but not what data moved through it, or it may show the data and so create a PHI storage problem. Second, the policy applied: logs that record an action rarely record which rule governed it. Third, the decision outcome: if an action was blocked, redacted or sent for approval, you need that outcome recorded as evidence, not inferred from absence. Fourth, tamper-resistant retention that you can demonstrate rather than assert.

    These gaps share a cause. Most logs are written after an action by the system that performed it, so they describe activity but not authorization. Evidence about what was permitted and what was decided has to be produced at the point where the decision is made.

    Where runtime policy enforcement fits

    Trussed addresses the gaps above at one specific layer: the tool call. It enforces policy in the execution path across models, agents, tools and MCP servers, so each interaction or tool call is allowed, redacted, blocked, rate limited or escalated for human approval at runtime, not reviewed after the fact. Because the decision happens in the path, the enforcement itself generates the evidence: which policy applied, what the outcome was, and when. That audit-ready evidence is mapped to HIPAA, including 164.312(b) audit controls.

    This complements native Microsoft logs rather than replacing them. Its scope is individual interactions and tool calls, and it does not provide end-to-end tracing of agentic workflows or transaction-level governance. Trussed is self-managed in the customer cloud, with configurable retention and data residency, which lets a regulated enterprise keep evidence under its own controls. It runs in production with healthcare and pharma organizations.

    Four questions an agent audit record should answer

    Permitted

    What the agent was allowed to call and under which policy.

    Executed

    Which tool call, connector action or flow run actually occurred, with identity and timestamp.

    Decided

    Whether the action was allowed, redacted, blocked or escalated.

    Retained

    Whether the record is protected from alteration and available for a defined period.

    Review your agent audit evidence against HIPAA

    Talk through your Copilot Studio evidence matrix and see how enforcement at the tool call produces audit-ready records.

    Explore Agent and Tool-Call Enforcement
    Next step

    How does your AI governance program compare?

    See where your program has gaps in less than 2 minutes.