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
- A Log Analytics workspace with Microsoft Sentinel enabled.
- A Microsoft Entra ID app registration with a client secret.
- A custom table and a data collection rule that writes to it (see below).
- Network egress allowed from your deployment to
https://login.microsoftonline.comand to your logs ingestion endpoint on port 443.
Set up Azure
- 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.
- 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_CLsuffix), and create a new data collection rule for it. When asked for a sample file, upload one with the columns below. - Grant access. Open the DCR, go to Access control (IAM), and assign the Monitoring Metrics Publisher role to your app registration.
- Collect the IDs. On the DCR's Overview page, open JSON View and copy the
immutableId(it starts withdcr-) and thelogsIngestionendpoint. If your DCR uses a data collection endpoint (DCE), use the DCE's logs ingestion URL instead. The stream name is understreamDeclarations, for exampleCustom-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:
| Column | Type | Contents |
|---|---|---|
TimeGenerated | datetime | The audit log's created_at. |
Action | string | The event action, e.g. tool_call. |
OrgId | string | Your Willow organization ID. |
UserEmail | string | The user's email. Empty in anonymous mode or when no user is known. |
Event | dynamic | The 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
| Field | Required | Description |
|---|---|---|
| Tenant ID | Yes | The Directory (tenant) ID of the app registration. |
| Client ID | Yes | The app registration's Application (client) ID. |
| Client Secret | Yes | A client secret for the app registration. |
| Logs Ingestion Endpoint | Yes | The DCR's or DCE's logs ingestion URL, e.g. https://my-dce-abcd.eastus-1.ingest.monitor.azure.com. |
| DCR Immutable ID | Yes | The DCR's immutableId, e.g. dcr-0123…. Not the resource ID. |
| Stream Name | Yes | The stream declared in the DCR, e.g. Custom-WillowAuditLogs_CL. |
| Anonymous Mode | No | Toggle 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
400or401from the token request: the tenant ID, client ID, or client secret is wrong, or the secret has expired.403from 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.404from 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.
Related
- Log Settings: retention, content options, and Anonymous Mode
- Logs: view and search the logs themselves
- Logs Ingestion API in Azure Monitor