bcquality/microsoft/knowledge/privacy/specify-dataclassification-on-every-telemetry-call.md
Jesper Schulz-Wedde 5bcdc55df9 Sync knowledge articles with review agent instructions
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-05 14:08:32 +02:00

1.7 KiB

bc-version domain keywords technologies countries application-area
all
privacy
telemetry
session-logmessage
dataclassification
dimensions
pii
al
w1
all

Specify DataClassification on every telemetry call and keep PII out of the message

Description

Session.LogMessage accepts a DataClassification parameter that governs how the platform handles the logged content in the telemetry pipeline. Omitting it is a schema violation the platform cannot repair later. Embedding personal data — emails, names, phone numbers, addresses, filenames of user uploads — in the message string also defeats classification, because the pipeline sees opaque text and cannot selectively redact. The same privacy boundary applies to other telemetry surfaces such as Codeunit "Feature Telemetry" custom dimensions.

Best Practice

Pass DataClassification explicitly on every Session.LogMessage call. Keep the message a generic, non-identifying sentence and place structured values in custom dimensions where the classification applies per key. Business identifiers (Customer No., Document No., Vendor No.) are acceptable as dimensions; free-text personal data is not.

See sample: specify-dataclassification-on-every-telemetry-call.good.al.

Anti Pattern

Session.LogMessage('0001', StrSubstNo('Customer %1 processed', Customer.Name), Verbosity::Normal, DataClassification::SystemMetadata, TelemetryScope::All) — the declared classification is SystemMetadata but the message carries CustomerContent. The payload is logged with the wrong tag; downstream consumers treat it as safe when it is not.

See sample: specify-dataclassification-on-every-telemetry-call.bad.al.