{"title":"Analyzing permission changes trace telemetry","url":"https://jonas-paprotka.de/docs/dev-itpro/administration/telemetry-permission-changes-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-permission-changes-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-permission-changes-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 Business Central permission change telemetry to track permission sets, user assignments, and changes made by extensions during installation or updates.","date":"2026-11-17","meta":{"topic":"concept-article"},"outline":[{"level":1,"title":"Analyzing permission changes trace telemetry","slug":"analyzing-permission-changes-trace-telemetry","at":0,"chars":18710},{"level":2,"title":"Common custom dimensions","slug":"common-custom-dimensions","at":716,"chars":1109},{"level":2,"title":"User-defined permission set added","slug":"user-defined-permission-set-added","at":1825,"chars":1648},{"level":3,"title":"General dimensions","slug":"general-dimensions","at":1916,"chars":348},{"level":3,"title":"Custom dimensions","slug":"custom-dimensions","at":2264,"chars":234},{"level":3,"title":"Sample KQL code (user-defined permission set added)","slug":"sample-kql-code-user-defined-permission-set-added","at":2498,"chars":975},{"level":2,"title":"User-defined permission set removed","slug":"user-defined-permission-set-removed","at":3473,"chars":1673},{"level":3,"title":"General dimensions","slug":"general-dimensions-1","at":3566,"chars":350},{"level":3,"title":"Custom dimensions","slug":"custom-dimensions-1","at":3916,"chars":290},{"level":3,"title":"Sample KQL code (user-defined permission set removed)","slug":"sample-kql-code-user-defined-permission-set-removed","at":4206,"chars":940},{"level":2,"title":"Permission set link added","slug":"permission-set-link-added","at":5146,"chars":2210},{"level":3,"title":"General dimensions","slug":"general-dimensions-2","at":5459,"chars":375},{"level":3,"title":"Custom dimensions","slug":"custom-dimensions-2","at":5834,"chars":523},{"level":3,"title":"Sample KQL code (permission set link added)","slug":"sample-kql-code-permission-set-link-added","at":6357,"chars":999},{"level":2,"title":"Permission set link removed","slug":"permission-set-link-removed","at":7356,"chars":1990},{"level":3,"title":"General dimensions","slug":"general-dimensions-3","at":7486,"chars":377},{"level":3,"title":"Custom dimensions","slug":"custom-dimensions-3","at":7863,"chars":478},{"level":3,"title":"Sample KQL code (permission set link removed)","slug":"sample-kql-code-permission-set-link-removed","at":8341,"chars":1005},{"level":2,"title":"Permission set assigned to user","slug":"permission-set-assigned-to-user","at":9346,"chars":1637},{"level":3,"title":"General dimensions","slug":"general-dimensions-4","at":9433,"chars":346},{"level":3,"title":"Custom dimensions","slug":"custom-dimensions-4","at":9779,"chars":367},{"level":3,"title":"Sample KQL code (permission set assigned to user)","slug":"sample-kql-code-permission-set-assigned-to-user","at":10146,"chars":837},{"level":2,"title":"Permission set removed from user","slug":"permission-set-removed-from-user","at":10983,"chars":1650},{"level":3,"title":"General dimensions","slug":"general-dimensions-5","at":11078,"chars":347},{"level":3,"title":"Custom dimensions","slug":"custom-dimensions-5","at":11425,"chars":368},{"level":3,"title":"Sample KQL code (permission set removed from user)","slug":"sample-kql-code-permission-set-removed-from-user","at":11793,"chars":840},{"level":2,"title":"Permission set assigned to user group","slug":"permission-set-assigned-to-user-group","at":12633,"chars":1658},{"level":3,"title":"General dimensions","slug":"general-dimensions-6","at":12732,"chars":352},{"level":3,"title":"Custom dimensions","slug":"custom-dimensions-6","at":13084,"chars":303},{"level":3,"title":"Sample KQL code (permission set assigned to user group)","slug":"sample-kql-code-permission-set-assigned-to-user-group","at":13387,"chars":904},{"level":2,"title":"Permission set removed from user group","slug":"permission-set-removed-from-user-group","at":14291,"chars":1701},{"level":3,"title":"General dimensions","slug":"general-dimensions-7","at":14386,"chars":353},{"level":3,"title":"Custom dimensions","slug":"custom-dimensions-7","at":14739,"chars":305},{"level":3,"title":"Sample KQL code (permission set removed from user group)","slug":"sample-kql-code-permission-set-removed-from-user-group","at":15044,"chars":948},{"level":2,"title":"Permission set changed by an extension","slug":"permission-set-changed-by-an-extension","at":15992,"chars":1135},{"level":3,"title":"General dimensions","slug":"general-dimensions-8","at":16119,"chars":117},{"level":3,"title":"Custom dimensions","slug":"custom-dimensions-8","at":16236,"chars":891},{"level":2,"title":"Sample KQL code (analyze permission changes)","slug":"sample-kql-code-analyze-permission-changes","at":17127,"chars":1292},{"level":2,"title":"Related information","slug":"related-information","at":18419,"chars":291}],"text":"# Analyzing permission changes trace telemetry\nAPPLIES TO: Business Central 2020 release wave 2, version 17.2, and later\nPermission changes telemetry gathers data about the following operations on permission sets:\n A user-defined permission set was added or removed\n A link between a user-defined permission set and system permission set was added or removed\n A permission set was assigned to or removed from a user or user group\n A permission set was changed by an app/extension\nSee Assign permissions to users and groups</ui-define-granular-permissions>.\nThe AL events in this article are emitted only in Business Central online. The LC0058 event is emitted by the server during extension installation or updates.\n## Common custom dimensions\nThe following table explains custom dimensions for permission traces. The al-prefixed dimensions apply to the AL events, not to LC0058.\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.\nalCategory|AL PermissionSet\nalDataClassification|SystemMetadata\nalObjectId|1351, which is the ID of the Base Application codeunit that subscribes to the telemetry events.\nalObjectName|Telemetry Subscribers, which is the name of the Base Application codeunit that subscribes to the telemetry events.\nalObjectType|CodeUnit\ncomponent|Dynamics 365 Business Central Server.\ncomponentVersion|Specifies the version number of the component that emits telemetry (see the component dimension.)\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## User-defined permission set added\nOccurs when a user-defined permission set is created.\n### General dimensions\nDimension|Description or value\nmessage|User-defined permission set added: {alPermissionSetId}\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\nDimension|Description or value\neventId|AL0000E2A\nalNumberOfUserDefinedPermissionSets|Specifies the total number of user-defined permission sets.\nalPermissionSetId|Specifies the ID assigned to the permission set.\n### Sample KQL code (user-defined permission set added)\nThis KQL code can help you get started analyzing when a user-defined permission set was added.\n```kql\n// User-defined permission set added\ntraces\n| where timestamp > ago(60d) // adjust as needed\n| where customDimensions has 'AL0000E2A'\n| where customDimensions.eventId == 'AL0000E2A'\n| project timestamp\n// in which environment/company did it happen\n, aadTenantId = customDimensions.aadTenantId\n, environmentName = customDimensions.environmentName\n, environmentType = customDimensions.environmentType\n, companyName = customDimensions.companyName\n// what was changed\n, alNumberOfUserDefinedPermissionSets = customDimensions.alNumberOfUserDefinedPermissionSets\n, alPermissionSetId = customDimensions.alPermissionSetId\n// which user did it\n, usertelemetryId = case(\n  toint( substring(customDimensions.componentVersion,0,2)) >= 20, user_Id // user telemetry ID was introduced in the platform in version 20.0\n, 'N/A'\n)\n```\n## User-defined permission set removed\nOccurs when a user-defined permission set is deleted.\n### General dimensions\nDimension|Description or value\nmessage|User-defined permission set removed: {alPermissionSetId}\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|AL0000E2B|\n|alNumberOfUserDefinedPermissionSets|Specifies the total number of user-defined permission sets.|\n|alPermissionSetId|Specifies the ID of the permission set that was deleted.|\n|See common custom dimensions<#other>||\n### Sample KQL code (user-defined permission set removed)\nThis KQL code can help you get started analyzing when a user-defined permission set was removed.\n```kql\n// User-defined permission set removed\ntraces\n| where timestamp > ago(60d) // adjust as needed\n| where customDimensions.eventId == 'AL0000E2B'\n| project timestamp\n// in which environment/company did it happen\n, aadTenantId = customDimensions.aadTenantId\n, environmentName = customDimensions.environmentName\n, environmentType = customDimensions.environmentType\n, companyName = customDimensions.companyName\n// what was changed\n, alNumberOfUserDefinedPermissionSets = customDimensions.alNumberOfUserDefinedPermissionSets\n, alPermissionSetId = customDimensions.alPermissionSetId\n// which user did it\n, usertelemetryId = case(\n  toint( substring(customDimensions.componentVersion,0,2)) >= 20, user_Id // user telemetry ID was introduced in the platform in version 20.0\n, 'N/A'\n)\n```\n## Permission set link added\nOccurs when a user-defined permission set is created from a copy of a system permission set, and the Notify on Changed Permission Set option is selected. The Notify on Changed Permission Set option creates a link between the system permission set and the user-defined permission set.\n### General dimensions\nDimension|Description or value\nmessage|Permission set link added: {alSourcePermissionSetId} -> {alLinkedPermissionSetId}\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|AL0000E28|\n|alSourcePermissionSetId|Specifies the ID of the system permission set that was copied to create the user-defined permission set.|\n|alLinkedPermissionSetId|Specifies the ID of the user-defined permission that was created from a copy of the system permission set.|\n|alNumberOfUserDefinedPermissionSetLinks|Specifies the total number of user-defined permission sets that are linked to system permission sets.|\n|See common custom dimensions<#other>||\n### Sample KQL code (permission set link added)\nThis KQL code can help you get started analyzing when a permission set link was added.\n```kql\n// Permission set link added\ntraces\n| where timestamp > ago(60d) // adjust as needed\n| where customDimensions.eventId == 'AL0000E28'\n| project timestamp\n// in which environment/company did it happen\n, aadTenantId = customDimensions.aadTenantId\n, environmentName = customDimensions.environmentName\n, environmentType = customDimensions.environmentType\n, companyName = customDimensions.companyName\n// what was changed\n, alSourcePermissionSetId = customDimensions.alSourcePermissionSetId\n, alLinkedPermissionSetId = customDimensions.alLinkedPermissionSetId\n, alNumberOfUserDefinedPermissionSetLinks = customDimensions.alNumberOfUserDefinedPermissionSetLinks\n// which user did it\n, usertelemetryId = case(\n  toint( substring(customDimensions.componentVersion,0,2)) >= 20, user_Id // user telemetry ID was introduced in the platform in version 20.0\n, 'N/A'\n)\n```\n## Permission set link removed\nOccurs when a user-defined permission set, which is linked to a system permission set, is deleted.\n### General dimensions\nDimension|Description or value\nmessage|Permission set link removed: {alSourcePermissionSetId} -> {alLinkedPermissionSetId}\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|AL0000E29|\n|alSourcePermissionSetId|Specifies the ID of the system permission set that the deleted user-defined permission set was linked to.|\n|alLinkedPermissionSetId|Specifies the ID of the deleted user-defined permission set.|\n|alNumberOfUserDefinedPermissionSetLinks|Specifies the total number of user-defined permission sets that are linked to system permission sets.|\n|See common custom dimensions<#other>||\n### Sample KQL code (permission set link removed)\nThis KQL code can help you get started analyzing when a permission set link was removed.\n```kql\n// Permission set link removed\ntraces\n| where timestamp > ago(60d) // adjust as needed\n| where customDimensions.eventId == 'AL0000E29'\n| project timestamp\n// in which environment/company did it happen\n, aadTenantId = customDimensions.aadTenantId\n, environmentName = customDimensions.environmentName\n, environmentType = customDimensions.environmentType\n, companyName = customDimensions.companyName\n// what was changed\n, alSourcePermissionSetId = customDimensions.alSourcePermissionSetId\n, alLinkedPermissionSetId = customDimensions.alLinkedPermissionSetId\n, alNumberOfUserDefinedPermissionSetLinks = customDimensions.alNumberOfUserDefinedPermissionSetLinks\n// which user did it\n, usertelemetryId = case(\n  toint( substring(customDimensions.componentVersion,0,2)) >= 20, user_Id // user telemetry ID was introduced in the platform in version 20.0\n, 'N/A'\n)\n```\n## Permission set assigned to user\nOccurs when a permission set is assigned to a user.\n### General dimensions\nDimension|Description or value\nmessage|Permission set assigned to user: {alPermissionSetId}\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|AL0000E2C|\n|alPermissionSetId|Specifies the ID of the permission set that was assigned to a user.|\n|alPermissionSetAppId|Specifies the app ID associated with the assigned permission set.|\n|alPermissionSetScope|Specifies the scope of the assigned permission set.|\n|See common custom dimensions<#other>||\n### Sample KQL code (permission set assigned to user)\nThis KQL code can help you get started analyzing when a permission set was assigned to a user.\n```kql\n// Permission set assigned to user\ntraces\n| where timestamp > ago(60d) // adjust as needed\n| where customDimensions.eventId == 'AL0000E2C'\n| project timestamp\n// in which environment/company did it happen\n, aadTenantId = customDimensions.aadTenantId\n, environmentName = customDimensions.environmentName\n, environmentType = customDimensions.environmentType\n, companyName = customDimensions.companyName\n// what was changed\n, alPermissionSetId = customDimensions.alPermissionSetId\n// which user did it\n, usertelemetryId = case(\n  toint( substring(customDimensions.componentVersion,0,2)) >= 20, user_Id // user telemetry ID was introduced in the platform in version 20.0\n, 'N/A'\n)\n```\n## Permission set removed from user\nOccurs when a permission set is removed from a user group.\n### General dimensions\nDimension|Description or value\nmessage|Permission set removed from user: {alPermissionSetId}\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|AL0000E2D|\n|alPermissionSetId|Specifies the ID of the permission set that was removed from the user.|\n|alPermissionSetAppId|Specifies the app ID associated with the removed permission set.|\n|alPermissionSetScope|Specifies the scope of the removed permission set.|\n|See common custom dimensions<#other>||\n### Sample KQL code (permission set removed from user)\nThis KQL code can help you get started analyzing when a permission set was removed from a user.\n```kql\n// Permission set removed from user\ntraces\n| where timestamp > ago(60d) // adjust as needed\n| where customDimensions.eventId == 'AL0000E2D'\n| project timestamp\n// in which environment/company did it happen\n, aadTenantId = customDimensions.aadTenantId\n, environmentName = customDimensions.environmentName\n, environmentType = customDimensions.environmentType\n, companyName = customDimensions.companyName\n// what was changed\n, alPermissionSetId = customDimensions.alPermissionSetId\n// which user did it\n, usertelemetryId = case(\n  toint( substring(customDimensions.componentVersion,0,2)) >= 20, user_Id // user telemetry ID was introduced in the platform in version 20.0\n, 'N/A'\n)\n```\n## Permission set assigned to user group\nOccurs when a permission set is assigned to a user group.\n### General dimensions\nDimension|Description or value\nmessage|Permission set assigned to user group: {alPermissionSetId}\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|AL0000E2E|\n|alPermissionSetId|Specifies the ID of the permission set that was assigned to the user group.|\n|alUserGroupId|Specifies the ID of the user group that the permission set was assigned to.|\n|See common custom dimensions<#other>||\n### Sample KQL code (permission set assigned to user group)\nThis KQL code can help you get started analyzing when a permission set was assigned to a user group.\n```kql\n// Permission set assigned to user group\ntraces\n| where timestamp > ago(60d) // adjust as needed\n| where customDimensions.eventId == 'AL0000E2E'\n| project timestamp\n// in which environment/company did it happen\n, aadTenantId = customDimensions.aadTenantId\n, environmentName = customDimensions.environmentName\n, environmentType = customDimensions.environmentType\n, companyName = customDimensions.companyName\n// what was changed\n, alPermissionSetId = customDimensions.alPermissionSetId\n, alUserGroupId = customDimensions.alUserGroupId\n// which user did it\n, usertelemetryId = case(\n  toint( substring(customDimensions.componentVersion,0,2)) >= 20, user_Id // user telemetry ID was introduced in the platform in version 20.0\n, 'N/A'\n)\n```\n## Permission set removed from user group\nOccurs when a permission set is removed from a user.\n### General dimensions\nDimension|Description or value\nmessage|Permission set removed from user group: {alPermissionSetId}\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|AL0000E2F|\n|alPermissionSetId|Specifies the ID of the permission set that was removed from the user group.|\n|alUserGroupId|Specifies the ID of the user group that the permission set was removed from.|\n|See common custom dimensions<#other>||\n### Sample KQL code (permission set removed from user group)\nThis KQL code can help you get started analyzing when a permission set was removed from a user group.\n```kql\n// Permission set removed from user group\ntraces\n| where timestamp > ago(60d) // adjust as needed\n| where customDimensions has 'AL0000E2F'\n| where customDimensions.eventId == 'AL0000E2F'\n| project timestamp\n// in which environment/company did it happen\n, aadTenantId = customDimensions.aadTenantId\n, environmentName = customDimensions.environmentName\n, environmentType = customDimensions.environmentType\n, companyName = customDimensions.companyName\n// what was changed\n, alPermissionSetId = customDimensions.alPermissionSetId\n, alUserGroupId = customDimensions.alUserGroupId\n// which user did it\n, usertelemetryId = case(\n  toint( substring(customDimensions.componentVersion,0,2)) >= 20, user_Id // user telemetry ID was introduced in the platform in version 20.0\n, 'N/A'\n)\n```\n## Permission set changed by an extension\nOccurs when a permission set was changed by an app/extension at install/update time.\n### General dimensions\nDimension|Description or value\nmessage|Permission set changed by an extension\nseverityLevel|1\n### Custom dimensions\n|Dimension|Description or value|\n|eventId|LC0058|\n|extensionName|Specifies the name of the app/extension that changed the permission set.|\n|extensionId|Specifies the id of the app/extension that changed the permission set.|\n|extensionVersion|Specifies the version of the app/extension that changed the permission set.|\n|extensionPublisher|Specifies the publisher of the app/extension that changed the permission set.|\n|permissionSetExtensionObjectId|Specifies the object ID for the permission set extension that changed the permission set.|\n|permissionSetExtensionObjectName|Specifies the name of the object for the permission set extension that changed the permission set.|\n|permissionSetId|Specifies the ID of the permission set that was changed.|\n|permissionSetName|Specifies the name of the permission set that was changed.|\n|See common custom dimensions<#other>||\n## Sample KQL code (analyze permission changes)\nThis KQL code can help you get started analyzing changes to permission sets.\n```kql\ntraces\n| where timestamp > ago(60d) // adjust as needed\n| where customDimensions.eventId == 'LC0058'\n| project timestamp\n// in which environment/company did it happen\n, aadTenantId = customDimensions.aadTenantId\n, environmentName = customDimensions.environmentName\n, environmentType = customDimensions.environmentType\n, companyName = customDimensions.companyName\n// in which extension/app\n, extensionId = customDimensions.extensionId\n, extensionName = customDimensions.extensionName\n, extensionVersion = customDimensions.extensionVersion\n, extensionPublisher = customDimensions.extensionPublisher\n// which permission set extension changed which permission set\n, permissionSetExtensionObjectId = customDimensions.permissionSetExtensionObjectId\n, permissionSetExtensionObjectName = customDimensions.permissionSetExtensionObjectName\n, permissionSetId = customDimensions.permissionSetId\n, permissionSetName = customDimensions.permissionSetName\n// which user initiated the operation\n, usertelemetryId = case(\n  toint( substring(customDimensions.componentVersion,0,2)) >= 20, user_Id // user telemetry ID was introduced in the platform in version 20.0\n, 'N/A'\n)\n```\n## Related information\nAudit permission administration events in Microsoft Purview<../auditing/audit-events-in-purview#administered-user-activities>\nMonitoring and Analyzing Telemetry<telemetry-overview>\nEnable Sending Telemetry to Application Insights<telemetry-enable-application-insights>"}