Linking each Azure OpenAI request to the policy version that approved it
To link Azure OpenAI requests to the policy version that approved them, evaluate policy in the request path and write a decision record at that moment. The record carries a shared correlation ID, the policy identifier, an immutable version or content hash, the timestamp, the outcome, and the rules matched. Store policy versions so they cannot be overwritten, and keep the correlation ID in every system that touches the request.
- 1
Entry point
Assign the correlation ID and capture caller identity and target deployment.
- 2
Evaluation
Resolve the active policy version by identifier and hash, then evaluate the request.
- 3
Decision write
Persist the decision record before forwarding or returning a block or escalation.
- 4
Forwarding
Pass the correlation ID to downstream calls so Azure-side data can be joined later.
- 5
1. Locate the request
Find the correlation ID from the auditor's reference, such as a timestamp, user, or application log entry.
- 6
2. Retrieve the decision record
Query the decision store by correlation ID and confirm exactly one record exists.
- 7
3. Resolve the policy version
Use the recorded hash to fetch the bundle from immutable storage and verify the digest and signature.
- 8
4. Replay the rules
Confirm the matched rule identifiers exist in that bundle and are consistent with the recorded outcome.
- 9
5. Join the Azure-side data
Match the forwarded identifiers to diagnostic records to show the request reached the deployment, or did not.
Gap assessment for your current setup
- A single correlation ID appears in the request log, the decision record, and forwarded Azure calls.
- Every decision record names a policy identifier, version, and content hash.
- Decisions are written at request time in the execution path, not inferred from logs later.
- Released policy versions are stored immutably and retrievable without the repository head.
- Retention periods for decision records and policy bundles are defined and agreed with compliance.
- The verification walkthrough has been run end to end on a real past request.
Why logs alone do not prove which policy applied
A regulated enterprise running Azure OpenAI workloads may need to show an auditor which version of a policy was in force for a given request and what decision it produced. The evidence for that answer usually sits in three places: application or gateway request logs, Azure diagnostic data, and a policy repository. These stores are managed by different teams, retain data differently, and rarely share an identifier.
Policies also change. A rule edited in March may have allowed an interaction that the same repository would block in June. If the only record is the current repository head and a request log, the team has to infer which rules applied. That inference is the point where evidence becomes inconsistent or open to dispute.
The design goal is therefore narrow. For any request, you need a durable binding that names the policy version evaluated, the decision it returned, and a way to retrieve the exact policy content. The binding should be created when the request is processed, not reconstructed afterward.
The decision record schema
The decision record is a first-class object, not a log line. It should be small, structured, and written once. The minimum set of fields answers the auditor's question without requiring a second lookup to interpret it. Keep the record free of full prompt content where you can; store a reference or hash to the request payload instead, and decide separately where payloads are retained and who can read them.
The hash matters more than the label. A policy named "customer-data-v3" can be edited in place, but a hash of the policy content cannot silently change. Recording both the human-readable version and the content hash lets a reviewer read the history and a verifier prove nothing was altered.
- Correlation ID: The identifier shared with request logs and any Azure-side records.
- Policy identifier and version: Which policy, and which numbered or tagged release of it.
- Policy content hash: A digest of the exact policy bundle evaluated.
- Evaluation timestamp: When the decision was made, from a consistent time source.
- Decision outcome: Allow, redact, block, rate limit, or escalate, plus any approver reference.
- Rules matched: The rule identifiers that produced the outcome.
Making policy versions immutable and retrievable
Three common techniques support immutable policy versions, and they combine well. Version-controlled policy-as-code gives you reviewable history and tagged releases. Content addressing stores each released bundle under its own hash, so the same hash always returns the same bytes. Signing the bundle at release lets a verifier confirm it came from your release process and was not modified in storage.
Whatever you choose, the retrieval path must not depend on the mutable head of a repository. Released bundles should be copied to write-once or append-only storage, with deletion and overwrite restricted. The decision record's hash then resolves to a stored bundle, even if the source repository is later rewritten, renamed, or archived.
Retention is a separate decision. Decision records, policy bundles, and any linked payload references should all be kept for at least as long as the longest period your regulators and counsel require for the related interactions. Those periods vary by jurisdiction and record type, so set them with your compliance team rather than inheriting a default from the storage tier. Also decide who can read the records and how access to them is itself recorded.
Request-to-policy-version binding
Request
Receives a correlation ID before any policy evaluation.
Policy evaluation
Runs in the execution path against a specific policy version.
Decision record
Written at request time with the version hash and outcome.
Immutable policy store
Returns the exact rule set for that version on demand.
Produce decision evidence from enforcement, not reconstruction
Trussed enforces policy in the execution path and generates audit-ready evidence from each decision, deployed self-managed in your cloud with configurable retention and data residency.
See How Evidence Is ProducedHow does your AI governance program compare?
See where your program has gaps in less than 2 minutes.