{"title":"Analyzing retention policy trace telemetry","url":"https://jonas-paprotka.de/docs/dev-itpro/administration/telemetry-retention-policy-trace/","by":"JOP-AL","license":"Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/administration/telemetry-retention-policy-trace, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact.","credit":"Microsoft Corporation, CC BY 4.0","origin":"https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/administration/telemetry-retention-policy-trace","source":{"name":"Business Central developer and IT pro docs","repo":"https://github.com/MicrosoftDocs/dynamics365smb-devitpro-pb","commit":"828b6ee72fcd75755627cd6011f3d20899217ab2","date":"2026-11-19"},"checked":"2026-11-19","description":"Analyze retention policy telemetry in Business Central to monitor policy log entries, deleted records, and when policies are enabled or disabled.","date":"2026-11-17","meta":{"topic":"reference"},"outline":[{"level":1,"title":"Analyzing retention policy trace telemetry","slug":"analyzing-retention-policy-trace-telemetry","at":0,"chars":7151},{"level":2,"title":"Retention policy log entry logged","slug":"retention-policy-log-entry-logged","at":1294,"chars":2900},{"level":3,"title":"General dimensions","slug":"general-dimensions","at":1576,"chars":381},{"level":3,"title":"Custom dimensions","slug":"custom-dimensions","at":1957,"chars":2237},{"level":2,"title":"Records deleted using retention policy","slug":"records-deleted-using-retention-policy","at":4194,"chars":1100},{"level":3,"title":"General dimensions","slug":"general-dimensions-1","at":4301,"chars":406},{"level":3,"title":"Custom dimensions","slug":"custom-dimensions-1","at":4707,"chars":587},{"level":2,"title":"First retention policy enabled on company","slug":"first-retention-policy-enabled-on-company","at":5294,"chars":828},{"level":3,"title":"General dimensions","slug":"general-dimensions-2","at":5403,"chars":344},{"level":3,"title":"Custom dimensions","slug":"custom-dimensions-2","at":5747,"chars":375},{"level":2,"title":"Last retention policy disabled on company","slug":"last-retention-policy-disabled-on-company","at":6122,"chars":864},{"level":3,"title":"General dimensions","slug":"general-dimensions-3","at":6250,"chars":344},{"level":3,"title":"Custom dimensions","slug":"custom-dimensions-3","at":6594,"chars":392},{"level":2,"title":"Related information","slug":"related-information","at":6986,"chars":165}],"text":"# Analyzing retention policy trace telemetry\nAPPLIES TO: Business Central 2020 release wave 2, update 17.1 and later\nAdministrators define retention policies to specify how frequently they want Business Central to delete outdated data in tables that contain log entries and archived records. For example, cleaning up log entries makes it easier to work with the data that's relevant. Policies can include all data in the tables that is past the expiration date. Or you can add filter criteria to include only certain expired data in the policy.\nTo gather this telemetry data, you have to set up retention policies on tables that contain log entries and archived records. See Define Retention Policies</admin-data-retention-policies> in the Application help.\nTelemetry is then logged for the following operations:\n A table is added to the list of allowed tables\n An error occurs when adding a new retention policy\n A retention policy is enabled\n A retention policy is applied, either manually or automatically\n Data is deleted because of a retention policy\n The first retention policy is enabled on a table in a company\n The last enabled retention policy is disabled or deleted in a company\nThese events use `TelemetryScope::All` and the OrganizationIdentifiableInformation data classification.\n## Retention policy log entry logged\nOccurs when a retention policy is enabled, applied, or disabled. It provides information about the different operations related to the retention policy. This information is similar to what you see in the Retention Policy Log page in the client.\n### General dimensions\nDimension|Description or value\nmessage|Retention Policy Log Entry Logged: {alMessageType}\nseverityLevel|3 for error, 2 for warning, 1 for info\nuser_Id|The user telemetry ID for the user. From the user card, you can use user_Id to identify the user who triggered this telemetry event. See telemetry-enable-application-insights#assign-a-telemetry-id-to-users.\n### Custom dimensions\nDimension|Description or value\neventId|AL0000D3L\nalCategory|Specifies the aspect of the retention policy that created the log entry. For example, it can be related to setup, the retention period, and when the policy was applied. Some of the values are: Retention Policy - Setup, Retention Policy - Apply, Retention Policy - Schedule, Retention Policy - Allowed Tables.\nalCompanyName|Specifies the Business Central company that the retention policy applies to.\nalLogEntry|Specifies message about the retention policy execution step, for example: Table 405 Change Log Entry was added to the list of allowed tables. Default Date Field No.: 2000000001\nalMessageType|Specifies the message type for the log entry: <ul><li>Error: Indicates an error occurred.</li><li>Warning: Indicates a warning condition.</li><li>Info: Provides information about the operation.</li></ul>\nCommon custom dimensions\nThe following table explains other custom dimensions that are common to all retention policy traces.\nDimension|Description or value\naadTenantId|Specifies the Microsoft Entra tenant ID used for Microsoft Entra authentication. For on-premises, if you aren't using Microsoft Entra authentication, this value is common.\ncomponent|Dynamics 365 Business Central Server.\ncomponentVersion|Specifies the version number of the component that emits telemetry (see the component dimension.)\nenvironmentName|Specifies the name of the tenant environment. See Managing Environments<tenant-admin-center-environments>. This dimension isn't included for Business Central on-premises environments.\nalDataClassification|OrganizationIdentifiableInformation\nalObjectId|3912, which is the ID of the `Reten. Policy Telemetry Impl.` codeunit.\nalObjectName|`Reten. Policy Telemetry Impl.`\nalObjectType|CodeUnit\nextensionId|Specifies the ID of the system application: 63ca2fa4-4f03-4f2b-a480-172fef340d3f.\nextensionName|System Application\nextensionVersion|Specifies the version of the system application.\nenvironmentType|Specifies the environment type for the tenant, such as Production, Sandbox, Trial. See tenant-admin-center-environments#types-of-environments.\ntelemetrySchemaVersion|Specifies the version of the Business Central telemetry schema.\n## Records deleted using retention policy\nOccurs when a batch of records is deleted by a retention policy.\n### General dimensions\nDimension|Description or value\nmessage|Records Deleted Using Retention Policy: Deleted {alRecordsDeleted} records from Table {alTableNo}, {alTableName}\nseverityLevel|1\nuser_Id|The user telemetry ID for the user. From the user card, you can use user_Id to identify the user who triggered this telemetry event. See telemetry-enable-application-insights#assign-a-telemetry-id-to-users.\n### Custom dimensions\n|Dimension|Description or value|\n|eventId|AL0000D6H|\n|alCompanyName|Specifies the Business Central company that the retention policy applies to.|\n|alManualRun|Specifies whether the retention policy was run manually, true, or automatically by a job queue entry, false.|\n|alRecordsDeleted|Specifies the number of records that were deleted by the retention policy.|\n|alTableName|Specifies the name of the table from which the records were deleted.|\n|alTableNo|Specifies the ID of the table from which the records were deleted.|\n|See common custom dimensions<#other>||\n## First retention policy enabled on company\nOccurs when the first retention policy is enabled in a company.\n### General dimensions\nDimension|Description or value\nmessage|First retention policy enabled on: {alCompanyName}\nseverityLevel|1\nuser_Id|The user telemetry ID for the user. From the user card, you can use user_Id to identify the user who triggered this telemetry event. See telemetry-enable-application-insights#assign-a-telemetry-id-to-users.\n### Custom dimensions\n|Dimension|Description or value|\n|eventId|AL0000D6I|\n|alCompanyName|Specifies the Business Central company that the retention policy applies to.|\n|alTableName|Specifies the name of the table the retention policy was enabled on.|\n|alTableNo|Specifies the ID of the table that the retention policy was enabled on.|\n|See common custom dimensions<#other>||\n## Last retention policy disabled on company\nOccurs when the last enabled retention policy is disabled or deleted in a company.\n### General dimensions\nDimension|Description or value\nmessage|Last retention policy disabled on: {alCompanyName}\nseverityLevel|1\nuser_Id|The user telemetry ID for the user. From the user card, you can use user_Id to identify the user who triggered this telemetry event. See telemetry-enable-application-insights#assign-a-telemetry-id-to-users.\n### Custom dimensions\n|Dimension|Description or value|\n|eventId|AL0000D6J|\n|alCompanyName|Specifies the Business Central company that the retention policy applies to.|\n|alTableName|Specifies the name of the table whose retention policy was disabled or deleted.|\n|alTableNo|Specifies the ID of the table whose retention policy was disabled or deleted.|\n|See common custom dimensions<#other>||\n## Related information\nMonitoring and Analyzing Telemetry<telemetry-overview>\nEnable Sending Telemetry to Application Insights<telemetry-enable-application-insights>"}