Creating Custom Log Tables
This lesson explains how to create custom tables, and how to send them data.
Learning outcomes
After completing this lesson, you will be able to:
- Compare the Logs Ingestion API with Custom logs via AMA.
- Identify table requirements.
- Describe the components of ingestion.
- Explain the use of transformations.
When a custom table is needed
An in-house application or a niche product may produce useful security events with no Sentinel connector. A custom log table holds such data, and it can then be queried, used in analytics rules, and retained like any other table. Custom tables have names ending in _CL, and the portal adds this suffix automatically. Azure's built-in tables cannot be deleted, but custom tables can.
Two main paths feed custom tables, as the following comparison shows.
Choosing an ingestion path
Table requirements
A custom table needs a TimeGenerated column of type datetime, and Azure adds it to the DCR transformation if it is missing. Each column has a name and a type, and a custom column name must begin with a letter, with up to 45 alphanumeric or underscore characters. Custom columns added to Azure's own tables need the _CF suffix. Columns can be added or deleted, but an existing column cannot be modified, and DCRs must be updated after schema changes.
Table plans are Analytics, which is the default, Basic, and Auxiliary or Lake. Creating and managing tables needs Microsoft.OperationalInsights/workspaces/* at workspace scope, as in Log Analytics Contributor. Creating a DCR needs Microsoft.Insights/dataCollectionRules/write, as in Monitoring Contributor. Tables can be created in the portal, or with the Azure CLI, Azure PowerShell, REST, Bicep or ARM templates.
Custom table rules
Using the Logs Ingestion API
The Logs Ingestion API accepts a JSON array posted to a DCR's endpoint. It needs a Microsoft Entra application, or a managed identity, with the Monitoring Metrics Publisher role on the DCR, and it enforces TLS 1.2 or higher. A data collection endpoint is needed only for private link, or for an older DCR with no logs ingestion endpoint of its own.
A DCR declares a stream, which describes the incoming data, and a transformation, which maps it to the table.
-
Create the table
Define a table such as AppSecurity_CL, with its columns.
-
Create the DCR
Define the incoming stream, the transformation and the destination.
-
Grant access
Assign Monitoring Metrics Publisher on the DCR to the sender.
-
Send data
POST JSON to the endpoint, with a token for https://monitor.azure.com.
-
Query
Confirm the data in the table, which can take several minutes at first.
The endpoint has this form: {endpoint}/dataCollectionRules/{dcrImmutableId}/streams/{streamName}?api-version={apiVersion}. A transformation can parse fields, rename columns, drop sensitive values and add calculated values.
The following diagram shows the steps of an ingestion request.

Sending application events
Custom logs from files
Where an application only writes files, use the Azure Monitor Agent. In Sentinel, the Custom logs via AMA connector, in preview, supports many listed device types. A table for this source has exactly two fields: TimeGenerated of type DateTime and RawData of type String. For forwarder-collected logs, the second field is named Message. If a listed device type is chosen, do not edit the portal's Transform field, since the transformation is provided. The same RBAC requirements apply as for Syslog: rights to deploy the agent and to create DCRs.
Transformations for security and cost
Transformations run at ingestion, so they can improve data before it is stored. They can remove personal data for privacy, drop noisy records to reduce cost, or parse a field into columns to simplify later queries. The following transformation drops debug records and hides a value.
source
| where Level != "Debug"
| extend UserName = hash_sha256(UserName)Sending application events
An in-house application running in Azure App Service must send JSON security events to Microsoft Sentinel. No secret may be stored, and analysts want named columns, not a single text field. What should you build?
Create a custom table with named columns and TimeGenerated, and a DCR with a stream and transformation. Give the app a managed identity with Monitoring Metrics Publisher on the DCR, and have it call the Logs Ingestion API.
Custom logs via AMA needs an agent and a file, which App Service does not suit, and it yields raw text. An application secret would break the requirement. The older HTTP Data Collector API should not be used for new work.
Which role lets an application send data through the Logs Ingestion API?
Show answer
Monitoring Metrics Publisher, assigned on the data collection rule.
Exam Tips
Remember for the exam
- Custom tables end in _CL, and need TimeGenerated.
- Grant Monitoring Metrics Publisher on the DCR to the sender.
- A data collection endpoint is usually unnecessary now.
- Custom logs via AMA tables have TimeGenerated and RawData.