# Analyzing Azure Function integration telemetry
Azure Function integration telemetry gathers data about the success or failure of calls from Business Central to Azure Functions using the Azure Function module<https://github.com/microsoft/BCApps/tree/main/src/System%20Application/App/Azure%20Function> in the System Application.
Failed operations result in a trace log entry that includes a reason for the failure.
These events use `TelemetryScope::All`. Successful requests use normal verbosity (severityLevel 1). Failed requests and authorization failures use error verbosity (severityLevel 3).
## Custom dimensions available in all events
The following dimensions can be available in all events described below and aren't included in the individual event documentation. Some dimensions depend on the environment or the session's permissions.
Dimension|Description or value
aadTenantId|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.
alCountryCode|Specifies the localization for the environment, such as US or DK.
alFunctionHost|The host name of the Azure function called from Business Central, without the URL scheme or path.
alIsAdmin|Whether the current user is a tenant admin or delegated admin.
alIsEvaluationCompany|Whether the current company is an evaluation company.
alTenantLicenseState|The license state of the tenant, such as Paid, Trial, Suspended, or Warning.
clientType|Specifies the type of client that opened the session, such as Background or Web. For a list of the client types, see ClientType Option Type<../developer/methods-auto/clienttype/clienttype-option>.
companyName|The current company name.
environmentName|Specifies the name of the tenant environment. See Managing Environments<tenant-admin-center-environments>.
environmentType|Specifies the environment type for the tenant, such as Production or Sandbox. See tenant-admin-center-environments#types-of-environments.
## Request sent to Azure function succeeded
Occurs when a request to an Azure function on the host {alFunctionHost} succeeded.
### General dimensions
Dimension|Description or value
message|Request sent to Azure function succeeded
### Custom dimensions
Dimension|Description or value
eventId|AL0000I74
alStatusCode|The HTTP status code for the request.
## Request sent to Azure function failed
Occurs when a request to an Azure function on the host {alFunctionHost} failed.
### General dimensions
Dimension|Description or value
message|Request sent to Azure function failed: {alFunctionHost}
### Custom dimensions
Dimension|Description or value
eventId|AL0000I7P
alStatusCode|The HTTP status code for the request.
### Sample KQL code
This KQL code can help you get started analyzing and alerting on request failures to Azure functions:
```kql
traces
| where timestamp > ago(5d) // adjust as needed
| where customDimensions.eventId == 'AL0000I7P'
| project timestamp
, aadTenantId = customDimensions.aadTenantId
, environmentName = customDimensions.environmentName
, environmentType = customDimensions.environmentType
, companyName = customDimensions.companyName
, requestStatusCode = customDimensions.alStatusCode
, functionHost = customDimensions.alFunctionHost
```
To learn more about how to set up alerting on Business Central telemetry, see telemetry-alert.
## Authorization failed to Azure function
Occurs when OAuth authentication with a client secret or certificate doesn't return an access token for the Azure function.
### General dimensions
Dimension|Description or value
message|Authorization failed to Azure function: {alFunctionHost}
### Custom dimensions
Dimension|Description or value
eventId|AL0000I75
alErrorText|Authorization failed to Azure function: {alFunctionHost}
alEventName|Acquiring token
### Sample KQL code
This KQL code can help you get started analyzing and alerting on failures to authorize to Azure functions:
```kql
traces
| where timestamp > ago(5d) // adjust as needed
| where customDimensions.eventId == 'AL0000I75'
| project timestamp
, aadTenantId = customDimensions.aadTenantId
, environmentName = customDimensions.environmentName
, environmentType = customDimensions.environmentType
, companyName = customDimensions.companyName
, errorText = customDimensions.alErrorText
, functionHost = customDimensions.alFunctionHost
```
To learn more about how to set up alerting on Business Central telemetry, see telemetry-alert.
## Related information
Monitoring and Analyzing Telemetry<telemetry-overview>
Enable Sending Telemetry to Application Insights<telemetry-enable-application-insights>
telemetry-alert
Connecting to Azure Functions<https://github.com/microsoft/BCApps/tree/main/src/System%20Application/App/Azure%20Function>
../developer/devenv-system-application-overview

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-azure-function-integration-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. https://jonas-paprotka.de/docs/dev-itpro/administration/telemetry-azure-function-integration-trace/
