Skip to main content

Microsoft Sentinel

Forward audit logs to Microsoft Sentinel so your audit trail is searchable with KQL and available to analytics rules.

Willow sends events through the Azure Monitor Logs Ingestion API. It signs in as a Microsoft Entra ID app registration and writes each event to a data collection rule (DCR) stream. The DCR then routes the stream into a custom table in the Log Analytics workspace that Sentinel runs on.

Prerequisites​

  1. A Log Analytics workspace with Microsoft Sentinel enabled.
  2. A Microsoft Entra ID app registration with a client secret.
  3. A custom table and a data collection rule that writes to it (see below).
  4. Network egress allowed from your deployment to https://login.microsoftonline.com and to your logs ingestion endpoint on port 443.

Set up Azure​

  1. Register an app. In the Azure portal, go to Microsoft Entra ID > App registrations > New registration. Note the Application (client) ID and Directory (tenant) ID. Under Certificates & secrets, create a client secret and copy its value.
  2. Create the table and DCR. In your Log Analytics workspace, go to Tables > Create > New custom log (DCR-based). Name the table, for example WillowAuditLogs (Azure adds the _CL suffix), and create a new data collection rule for it. When asked for a sample file, upload one with the columns below.
  3. Grant access. Open the DCR, go to Access control (IAM), and assign the Monitoring Metrics Publisher role to your app registration.
  4. Collect the IDs. On the DCR's Overview page, open JSON View and copy the immutableId (it starts with dcr-) and the logsIngestion endpoint. If your DCR uses a data collection endpoint (DCE), use the DCE's logs ingestion URL instead. The stream name is under streamDeclarations, for example Custom-WillowAuditLogs_CL.

Role assignments can take several minutes to apply. Until then, deliveries fail with 403.

Table columns​

Willow sends every event with the same five columns, so the stream and table only need to declare them once:

ColumnTypeContents
TimeGenerateddatetimeThe audit log's created_at.
ActionstringThe event action, e.g. tool_call.
OrgIdstringYour Willow organization ID.
UserEmailstringThe user's email. Empty in anonymous mode or when no user is known.
EventdynamicThe full audit log record.

A sample file for the table wizard:

[
{
"TimeGenerated": "2026-01-15T10:30:00.000Z",
"Action": "tool_call",
"OrgId": "org_123",
"UserEmail": "ada@example.com",
"Event": { "id": "…", "action": "tool_call", "data": {} }
}
]

Configuration fields​

FieldRequiredDescription
Tenant IDYesThe Directory (tenant) ID of the app registration.
Client IDYesThe app registration's Application (client) ID.
Client SecretYesA client secret for the app registration.
Logs Ingestion EndpointYesThe DCR's or DCE's logs ingestion URL, e.g. https://my-dce-abcd.eastus-1.ingest.monitor.azure.com.
DCR Immutable IDYesThe DCR's immutableId, e.g. dcr-0123…. Not the resource ID.
Stream NameYesThe stream declared in the DCR, e.g. Custom-WillowAuditLogs_CL.
Anonymous ModeNoToggle to send only statistical data (see Anonymous Mode).

How it works​

Willow requests a token from https://login.microsoftonline.com/<tenant>/oauth2/v2.0/token with the client credentials grant and the https://monitor.azure.com/.default scope. Tokens are cached and reused until shortly before they expire. If Azure rejects a token with 401 or 403, the cached token is discarded and the next delivery requests a new one.

Each event is then POSTed as a one-row JSON array to:

<endpoint>/dataCollectionRules/<dcr-immutable-id>/streams/<stream-name>?api-version=2023-01-01

Azure answers 204 on success. In anonymous mode the user object and data payload are left out of Event, and UserEmail is empty. The request timeout is 5 seconds.

Tips​

  • The Logs Ingestion API caps one call at 1 MB, so Willow shortens any event over about 900 KB before sending. Truncated values are marked with ...[truncated].
  • Use the Test button on the log provider to send a sample event. New rows can take a few minutes to show up. Then query the table, for example WillowAuditLogs_CL | take 10.
  • Only commercial Azure is supported. Azure Government and Azure China use different sign-in and ingestion hosts.

Troubleshooting​

  • 400 or 401 from the token request: the tenant ID, client ID, or client secret is wrong, or the secret has expired.
  • 403 from ingestion: the app registration doesn't have Monitoring Metrics Publisher on the DCR yet. Assign it and allow a few minutes for it to apply.
  • 404 from ingestion: the DCR immutable ID or stream name is wrong, or the endpoint belongs to a different region from the DCR.
  • Rows arrive with empty columns: the stream's column names or types don't match the table above.