All storiesSecurity

Document audit logs: record actors, versions, and completed business actions

Record business actions, version relationships, and authorization context without confusing audit history with raw application logs.

Document audit logs: record actors, versions, and completed business actions: Business event, Actor identity, State change, Record integrity.
Security / Office SDK

Record audit events around business actions such as version publication, access changes, export, restore, and deletion. Include the actor, affected document and version, outcome, and operation correlation. Raw request logs do not automatically explain what changed, and a successful HTTP response does not always mean the business action completed.

Define the business meaning of each event

Useful events can include document creation, version publication, permission changes, sharing, export, restoration, and deletion according to the application's requirements. Do not imply that every keystroke is audited unless the selected system actually provides and retains that evidence. Distinguish an attempted action from a completed action and identify denied operations where policy requires them. Define each event's semantics in a small schema catalogue. Consistent meanings matter more than collecting a large volume of loosely named messages that reviewers cannot compare across application versions or services.

Use fields that explain the affected state

Record the authenticated actor, tenant, action, business document ID, relevant source and resulting versions, outcome, timestamp, and operation identifier. For background work, distinguish the service performing the action from the user or process that initiated it. Avoid attributing a scheduled export to the last person who happened to edit the document. Preserve enough identity context to interpret historical events after accounts are renamed or disabled, while applying data minimization and retention rules. Filenames are useful context, but stable identifiers prevent ambiguity when names change.

Event fieldMeaning to preserve
Actor and initiatorWho performed the action and who requested background work
Document and tenantThe stable business object and access boundary
Before and after versionThe content transition, when the event changes a version
Action and outcomeAttempted, denied, accepted, or completed under defined semantics
Operation referenceA path to related technical evidence without embedding secrets

Do not fill missing information with misleading defaults. A background service publishing an export is not necessarily acting as the last editor. Preserve the initiating operation or represent an autonomous scheduled action explicitly. Similarly, an export-requested event and an export-ready event describe different outcomes and should not share an ambiguous label.

Design duplicate handling around the business action identity. Delivery retries may produce several transport records but should not make reviewers believe a permission change happened several times. Retain operational retries where useful for diagnosis while presenting one coherent business transition. Keep schema revisions documented so old event meanings remain interpretable after the application evolves.

An audit record connects actor context, action, affected state, and outcome.
Figure 1. Avoid storing document bodies or reusable credentials merely to make an event verbose.

Protect records and define logging failure behavior

Restrict who can write, read, export, and administer audit records. Use storage and integrity controls appropriate to the required assurance level, and verify their actual configuration. Do not call records tamper proof merely because ordinary users cannot see a delete button. Keep secrets, signed URLs, and document bodies out of routine event fields. Define failure behavior if the audit destination is unavailable: some actions may need to wait, while others may use a durable local queue. The choice should follow the business requirement and be tested explicitly.

Audit-readiness checks

  • Define event semantics and distinguish attempts from completed effects.
  • Record actor, document, version, outcome, and correlation context consistently.
  • Test audit delivery failure and duplicate handling.
  • Review access, retention, export, and integrity controls.
  • Verify that a reviewer can reconstruct a representative workflow from the recorded events.

Reconstruct a permission change, export, and restore

In a test project, have an administrator grant a reviewer access, let the reviewer export a named version, then revoke access and restore an older document version. Ask another authorized operator to reconstruct the sequence from audit records. They should identify the actors, versions, completed outcomes, and related operation traces without reading confidential document contents. Repeat one action after a simulated delivery retry and confirm that duplicate telemetry does not appear as two independent business changes. This validates the trail as evidence a person can actually interpret.

A reviewer follows grant, export, revoke, and restore events with their actors and versions.
Figure 2. Repeated delivery must not appear as repeated independent business changes.

Further reading

Back to all stories

Keep reading.

All stories