Analyzing web service access key telemetry

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

The Business Central emits telemetry data about the success or failure of authenticating web service access keys on web service requests.

Important

Starting October, 2022, the use of access keys (Basic Auth) for web service authentication is deprecated and not supported in Business Central online. We recommend that you use OAuth2 instead. For more information, see Using OAuth to Authorize Business Central Web Services.

As a partner or customer, this data lets you monitor the use of web service access keys on your environments in preparation for the deprecation of the feature.

Learn more in How to use an Access Key for SOAP and OData Web Service Authentication.

Authentication with web service key succeeded

Occurs when a web service access key was authenticated successfully.

General dimensions

The following table explains the general dimensions included in the trace. The table lists the dimensions that are specific to Business Central.

DimensionDescription or value
messageAuthentication with Web Service Key succeeded: {endpoint}
severityLevel1

Custom dimensions

The following table explains the custom dimensions included in the trace.

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.
alObjectIdSpecifies the ID of the AL object in the current context, if available. The authentication event occurs before the requested object runs.
authenticationStatusSucceeded
authenticationTypeSpecifies whether the service uses NavUserPassword or AccessControl authentication.
categorySpecifies the service type. Values include: Api, ODataV4, ODataV3, and SOAP.
componentDynamics 365 Business Central Server
componentVersionSpecifies the version number of the component that emits telemetry (see the component dimension.)
deprecatedKeysA comma-separated list of all the keys that have been deprecated. The keys in this list are still supported but will eventually be removed in the next major release. We recommend that you update any queries that use these keys to use the new key name.
endpointSpecifies the endpoint for the request. Private and sensitive information is omitted from the endpoint.
environmentTypeSpecifies the environment type for the tenant, such as Production, Sandbox, Trial. Learn more in Environment types.
eventIdRT0020
telemetrySchemaVersionSpecifies the version of the Business Central telemetry schema.

Authentication with web service key failed

Occurs when a web service access key request reaches the authentication check but the user isn't authenticated. Requests rejected earlier, such as requests that use a disabled authentication method, don't emit this event.

General dimensions

The following table explains the general dimensions included in the trace. The table lists the dimensions that are specific to Business Central.

DimensionDescription or value
messageAuthentication with Web Service Key failed: {endpoint}
severityLevel1

Custom dimensions

The following table explains the custom dimensions included in the trace.

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.
alObjectIdSpecifies the ID of the AL object in the current context, if available. The authentication event occurs before the requested object runs.
authenticationStatusFailed
authenticationTypeSpecifies whether the service uses NavUserPassword or AccessControl authentication.
categorySpecifies the service type. Values include: Api, ODataV4, ODataV3, and SOAP.
componentDynamics 365 Business Central Server
componentVersionSpecifies the version number of the component that emits telemetry (see the component dimension.)
deprecatedKeysA comma-separated list of all the keys that have been deprecated. The keys in this list are still supported but will eventually be removed in the next major release. We recommend that you update any queries that use these keys to use the new key name.
endpointSpecifies the endpoint for the request. Private and sensitive information is omitted from the endpoint.
environmentTypeSpecifies the environment type for the tenant, such as Production, Sandbox, Trial. Learn more in Environment types.
eventIdRT0021
failureReasonSpecifies why authentication failed. For a request whose user isn't authenticated, the value is Not authorized..
telemetrySchemaVersionSpecifies the version of the Business Central telemetry schema.

Example trace

The following code snippet is a CustomDimensions example:

{"component":"Dynamics 365 Business Central Server","category":"Api","AadTenantId":"common","environmentType":"Production","Component":"Dynamics 365 Business Central Server","AL Object Id":"0","alObjectId":"0","Telemetry schema version":"0.1","telemetrySchemaVersion":"0.1","authenticationType":"NavUserPassword","componentVersion":"17.0.15855.0","Component version":"17.0.15855.0","eventId":"RT0021","endpoint":"BC170/ODataV4/Company()/purchaseDocumentLines","deprecatedKeys":"Company name, AL Object Id, AL Object type, AL Object name, AL Stack trace, Client type, Extension name, Extension App Id, Extension version, Telemetry schema version, Component, Component version, Telemetry schema version, AadTenantId, Environment name, Environment type","aadTenantId":"common","Environment type":"Production","authenticationStatus":"Failed","failureReason":"Not authorized."}

Monitoring and Analyzing Telemetry
Enable Sending Telemetry to Application Insights