Analyzing permission changes trace telemetry

APPLIES TO: Business Central 2020 release wave 2, version 17.2, and later

Permission changes telemetry gathers data about the following operations on permission sets:

  • A user-defined permission set was added or removed
  • A link between a user-defined permission set and system permission set was added or removed
  • A permission set was assigned to or removed from a user or user group
  • A permission set was changed by an app/extension

Learn more in Assign permissions to users and groups.

The 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.

Common custom dimensions

The following table explains custom dimensions for permission traces. The al-prefixed dimensions apply to the AL events, not to LC0058.

DimensionDescription or value
aadTenantIdSpecifies 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.
alCategoryAL PermissionSet
alDataClassificationSystemMetadata
alObjectId1351, which is the ID of the Base Application codeunit that subscribes to the telemetry events.
alObjectNameTelemetry Subscribers, which is the name of the Base Application codeunit that subscribes to the telemetry events.
alObjectTypeCodeUnit
componentDynamics 365 Business Central Server.
componentVersionSpecifies the version number of the component that emits telemetry (see the component dimension.)
environmentTypeSpecifies the environment type for the tenant, such as Production, Sandbox, Trial. Learn more in Environment types.
telemetrySchemaVersionSpecifies the version of the Business Central telemetry schema.

User-defined permission set added

Occurs when a user-defined permission set is created.

General dimensions

DimensionDescription or value
messageUser-defined permission set added: {alPermissionSetId}
severityLevel1
user_IdThe user telemetry ID for the user. From the user card, you can use user_Id to identify the user who triggered this telemetry event. Learn more in Assign a telemetry ID to users.

Custom dimensions

DimensionDescription or value
eventIdAL0000E2A
alNumberOfUserDefinedPermissionSetsSpecifies the total number of user-defined permission sets.
alPermissionSetIdSpecifies the ID assigned to the permission set.

Sample KQL code (user-defined permission set added)

This KQL code can help you get started analyzing when a user-defined permission set was added.

// User-defined permission set added
traces
| where timestamp > ago(60d) // adjust as needed
| where customDimensions has 'AL0000E2A'
| where customDimensions.eventId == 'AL0000E2A'
| project timestamp
// in which environment/company did it happen
, aadTenantId = customDimensions.aadTenantId
, environmentName = customDimensions.environmentName
, environmentType = customDimensions.environmentType
, companyName = customDimensions.companyName
// what was changed
, alNumberOfUserDefinedPermissionSets = customDimensions.alNumberOfUserDefinedPermissionSets
, alPermissionSetId = customDimensions.alPermissionSetId
// which user did it
, usertelemetryId = case(
  toint( substring(customDimensions.componentVersion,0,2)) >= 20, user_Id // user telemetry ID was introduced in the platform in version 20.0
, 'N/A'
)

User-defined permission set removed

Occurs when a user-defined permission set is deleted.

General dimensions

DimensionDescription or value
messageUser-defined permission set removed: {alPermissionSetId}
severityLevel1
user_IdThe user telemetry ID for the user. From the user card, you can use user_Id to identify the user who triggered this telemetry event. Learn more in Assign a telemetry ID to users.

Custom dimensions

DimensionDescription or value
eventIdAL0000E2B
alNumberOfUserDefinedPermissionSetsSpecifies the total number of user-defined permission sets.
alPermissionSetIdSpecifies the ID of the permission set that was deleted.
See common custom dimensions

Sample KQL code (user-defined permission set removed)

This KQL code can help you get started analyzing when a user-defined permission set was removed.

// User-defined permission set removed
traces
| where timestamp > ago(60d) // adjust as needed
| where customDimensions.eventId == 'AL0000E2B'
| project timestamp
// in which environment/company did it happen
, aadTenantId = customDimensions.aadTenantId
, environmentName = customDimensions.environmentName
, environmentType = customDimensions.environmentType
, companyName = customDimensions.companyName
// what was changed
, alNumberOfUserDefinedPermissionSets = customDimensions.alNumberOfUserDefinedPermissionSets
, alPermissionSetId = customDimensions.alPermissionSetId
// which user did it
, usertelemetryId = case(
  toint( substring(customDimensions.componentVersion,0,2)) >= 20, user_Id // user telemetry ID was introduced in the platform in version 20.0
, 'N/A'
)

Occurs 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.

General dimensions

DimensionDescription or value
messagePermission set link added: {alSourcePermissionSetId} -> {alLinkedPermissionSetId}
severityLevel1
user_IdThe user telemetry ID for the user. From the user card, you can use user_Id to identify the user who triggered this telemetry event. Learn more in Assign a telemetry ID to users.

Custom dimensions

DimensionDescription or value
eventIdAL0000E28
alSourcePermissionSetIdSpecifies the ID of the system permission set that was copied to create the user-defined permission set.
alLinkedPermissionSetIdSpecifies the ID of the user-defined permission that was created from a copy of the system permission set.
alNumberOfUserDefinedPermissionSetLinksSpecifies the total number of user-defined permission sets that are linked to system permission sets.
See common custom dimensions

This KQL code can help you get started analyzing when a permission set link was added.

// Permission set link added
traces
| where timestamp > ago(60d) // adjust as needed
| where customDimensions.eventId == 'AL0000E28'
| project timestamp
// in which environment/company did it happen
, aadTenantId = customDimensions.aadTenantId
, environmentName = customDimensions.environmentName
, environmentType = customDimensions.environmentType
, companyName = customDimensions.companyName
// what was changed
, alSourcePermissionSetId = customDimensions.alSourcePermissionSetId
, alLinkedPermissionSetId = customDimensions.alLinkedPermissionSetId
, alNumberOfUserDefinedPermissionSetLinks = customDimensions.alNumberOfUserDefinedPermissionSetLinks
// which user did it
, usertelemetryId = case(
  toint( substring(customDimensions.componentVersion,0,2)) >= 20, user_Id // user telemetry ID was introduced in the platform in version 20.0
, 'N/A'
)

Occurs when a user-defined permission set, which is linked to a system permission set, is deleted.

General dimensions

DimensionDescription or value
messagePermission set link removed: {alSourcePermissionSetId} -> {alLinkedPermissionSetId}
severityLevel1
user_IdThe user telemetry ID for the user. From the user card, you can use user_Id to identify the user who triggered this telemetry event. Learn more in Assign a telemetry ID to users.

Custom dimensions

DimensionDescription or value
eventIdAL0000E29
alSourcePermissionSetIdSpecifies the ID of the system permission set that the deleted user-defined permission set was linked to.
alLinkedPermissionSetIdSpecifies the ID of the deleted user-defined permission set.
alNumberOfUserDefinedPermissionSetLinksSpecifies the total number of user-defined permission sets that are linked to system permission sets.
See common custom dimensions

This KQL code can help you get started analyzing when a permission set link was removed.

// Permission set link removed
traces
| where timestamp > ago(60d) // adjust as needed
| where customDimensions.eventId == 'AL0000E29'
| project timestamp
// in which environment/company did it happen
, aadTenantId = customDimensions.aadTenantId
, environmentName = customDimensions.environmentName
, environmentType = customDimensions.environmentType
, companyName = customDimensions.companyName
// what was changed
, alSourcePermissionSetId = customDimensions.alSourcePermissionSetId
, alLinkedPermissionSetId = customDimensions.alLinkedPermissionSetId
, alNumberOfUserDefinedPermissionSetLinks = customDimensions.alNumberOfUserDefinedPermissionSetLinks
// which user did it
, usertelemetryId = case(
  toint( substring(customDimensions.componentVersion,0,2)) >= 20, user_Id // user telemetry ID was introduced in the platform in version 20.0
, 'N/A'
)

Permission set assigned to user

Occurs when a permission set is assigned to a user.

General dimensions

DimensionDescription or value
messagePermission set assigned to user: {alPermissionSetId}
severityLevel1
user_IdThe user telemetry ID for the user. From the user card, you can use user_Id to identify the user who triggered this telemetry event. Learn more in Assign a telemetry ID to users.

Custom dimensions

DimensionDescription or value
eventIdAL0000E2C
alPermissionSetIdSpecifies the ID of the permission set that was assigned to a user.
alPermissionSetAppIdSpecifies the app ID associated with the assigned permission set.
alPermissionSetScopeSpecifies the scope of the assigned permission set.
See common custom dimensions

Sample KQL code (permission set assigned to user)

This KQL code can help you get started analyzing when a permission set was assigned to a user.

// Permission set assigned to user
traces
| where timestamp > ago(60d) // adjust as needed
| where customDimensions.eventId == 'AL0000E2C'
| project timestamp
// in which environment/company did it happen
, aadTenantId = customDimensions.aadTenantId
, environmentName = customDimensions.environmentName
, environmentType = customDimensions.environmentType
, companyName = customDimensions.companyName
// what was changed
, alPermissionSetId = customDimensions.alPermissionSetId
// which user did it
, usertelemetryId = case(
  toint( substring(customDimensions.componentVersion,0,2)) >= 20, user_Id // user telemetry ID was introduced in the platform in version 20.0
, 'N/A'
)

Permission set removed from user

Occurs when a permission set is removed from a user group.

General dimensions

DimensionDescription or value
messagePermission set removed from user: {alPermissionSetId}
severityLevel1
user_IdThe user telemetry ID for the user. From the user card, you can use user_Id to identify the user who triggered this telemetry event. Learn more in Assign a telemetry ID to users.

Custom dimensions

DimensionDescription or value
eventIdAL0000E2D
alPermissionSetIdSpecifies the ID of the permission set that was removed from the user.
alPermissionSetAppIdSpecifies the app ID associated with the removed permission set.
alPermissionSetScopeSpecifies the scope of the removed permission set.
See common custom dimensions

Sample KQL code (permission set removed from user)

This KQL code can help you get started analyzing when a permission set was removed from a user.

// Permission set removed from user
traces
| where timestamp > ago(60d) // adjust as needed
| where customDimensions.eventId == 'AL0000E2D'
| project timestamp
// in which environment/company did it happen
, aadTenantId = customDimensions.aadTenantId
, environmentName = customDimensions.environmentName
, environmentType = customDimensions.environmentType
, companyName = customDimensions.companyName
// what was changed
, alPermissionSetId = customDimensions.alPermissionSetId
// which user did it
, usertelemetryId = case(
  toint( substring(customDimensions.componentVersion,0,2)) >= 20, user_Id // user telemetry ID was introduced in the platform in version 20.0
, 'N/A'
)

Permission set assigned to user group

Occurs when a permission set is assigned to a user group.

General dimensions

DimensionDescription or value
messagePermission set assigned to user group: {alPermissionSetId}
severityLevel1
user_IdThe user telemetry ID for the user. From the user card, you can use user_Id to identify the user who triggered this telemetry event. Learn more in Assign a telemetry ID to users.

Custom dimensions

DimensionDescription or value
eventIdAL0000E2E
alPermissionSetIdSpecifies the ID of the permission set that was assigned to the user group.
alUserGroupIdSpecifies the ID of the user group that the permission set was assigned to.
See common custom dimensions

Sample KQL code (permission set assigned to user group)

This KQL code can help you get started analyzing when a permission set was assigned to a user group.

// Permission set assigned to user group
traces
| where timestamp > ago(60d) // adjust as needed
| where customDimensions.eventId == 'AL0000E2E'
| project timestamp
// in which environment/company did it happen
, aadTenantId = customDimensions.aadTenantId
, environmentName = customDimensions.environmentName
, environmentType = customDimensions.environmentType
, companyName = customDimensions.companyName
// what was changed
, alPermissionSetId = customDimensions.alPermissionSetId
, alUserGroupId = customDimensions.alUserGroupId
// which user did it
, usertelemetryId = case(
  toint( substring(customDimensions.componentVersion,0,2)) >= 20, user_Id // user telemetry ID was introduced in the platform in version 20.0
, 'N/A'
)

Permission set removed from user group

Occurs when a permission set is removed from a user.

General dimensions

DimensionDescription or value
messagePermission set removed from user group: {alPermissionSetId}
severityLevel1
user_IdThe user telemetry ID for the user. From the user card, you can use user_Id to identify the user who triggered this telemetry event. Learn more in Assign a telemetry ID to users.

Custom dimensions

DimensionDescription or value
eventIdAL0000E2F
alPermissionSetIdSpecifies the ID of the permission set that was removed from the user group.
alUserGroupIdSpecifies the ID of the user group that the permission set was removed from.
See common custom dimensions

Sample KQL code (permission set removed from user group)

This KQL code can help you get started analyzing when a permission set was removed from a user group.

// Permission set removed from user group
traces
| where timestamp > ago(60d) // adjust as needed
| where customDimensions has 'AL0000E2F'
| where customDimensions.eventId == 'AL0000E2F'
| project timestamp
// in which environment/company did it happen
, aadTenantId = customDimensions.aadTenantId
, environmentName = customDimensions.environmentName
, environmentType = customDimensions.environmentType
, companyName = customDimensions.companyName
// what was changed
, alPermissionSetId = customDimensions.alPermissionSetId
, alUserGroupId = customDimensions.alUserGroupId
// which user did it
, usertelemetryId = case(
  toint( substring(customDimensions.componentVersion,0,2)) >= 20, user_Id // user telemetry ID was introduced in the platform in version 20.0
, 'N/A'
)

Permission set changed by an extension

Occurs when a permission set was changed by an app/extension at install/update time.

General dimensions

DimensionDescription or value
messagePermission set changed by an extension
severityLevel1

Custom dimensions

DimensionDescription or value
eventIdLC0058
extensionNameSpecifies the name of the app/extension that changed the permission set.
extensionIdSpecifies the id of the app/extension that changed the permission set.
extensionVersionSpecifies the version of the app/extension that changed the permission set.
extensionPublisherSpecifies the publisher of the app/extension that changed the permission set.
permissionSetExtensionObjectIdSpecifies the object ID for the permission set extension that changed the permission set.
permissionSetExtensionObjectNameSpecifies the name of the object for the permission set extension that changed the permission set.
permissionSetIdSpecifies the ID of the permission set that was changed.
permissionSetNameSpecifies the name of the permission set that was changed.
See common custom dimensions

Sample KQL code (analyze permission changes)

This KQL code can help you get started analyzing changes to permission sets.

traces
| where timestamp > ago(60d) // adjust as needed
| where customDimensions.eventId == 'LC0058'
| project timestamp
// in which environment/company did it happen
, aadTenantId = customDimensions.aadTenantId
, environmentName = customDimensions.environmentName
, environmentType = customDimensions.environmentType
, companyName = customDimensions.companyName
// in which extension/app
, extensionId = customDimensions.extensionId
, extensionName = customDimensions.extensionName
, extensionVersion = customDimensions.extensionVersion
, extensionPublisher = customDimensions.extensionPublisher
// which permission set extension changed which permission set
, permissionSetExtensionObjectId = customDimensions.permissionSetExtensionObjectId
, permissionSetExtensionObjectName = customDimensions.permissionSetExtensionObjectName
, permissionSetId = customDimensions.permissionSetId
, permissionSetName = customDimensions.permissionSetName
// which user initiated the operation
, usertelemetryId = case(
  toint( substring(customDimensions.componentVersion,0,2)) >= 20, user_Id // user telemetry ID was introduced in the platform in version 20.0
, 'N/A'
)

Audit permission administration events in Microsoft Purview
Monitoring and Analyzing Telemetry
Enable Sending Telemetry to Application Insights