Azure Event Hubs setup
Azure Event Hubs connector setup
Consumes events from an Azure Event Hub via a consumer group. This is a streaming connector (long-running consumption, not scheduled polling).
What you need first
| Requirement | Details |
|---|---|
| Event Hubs namespace | Active namespace with your event hub |
| Event hub | Hub receiving events from your publishers |
| Connection string | With Listen permission on the event hub |
| Consumer group | Dedicated group recommended (default $Default works) |
1. Get Event Hub connection details
- Sign in to the Azure portal.
- Open your Event Hubs Namespace → Event Hubs → select your hub.
- Note the Event hub name.
- Under Settings → Shared access policies, create or open a policy with Listen claim.
- Copy the Connection string–primary key (or namespace-level connection string with Listen on this hub).
Consumer group (recommended)
- In the event hub, open Consumer groups.
- Add a dedicated group (e.g.
perpetual) instead of sharing$Defaultwith other consumers.
The connection string embeds the namespace (*.servicebus.windows.net); you do not enter the namespace separately.
2. Perpetual credential
- Log in to Perpetual. Open Settings from the user/org control at the bottom left of the sidebar (click your name → Settings), then go to Credentials → New Credential.
- Choose Text.
- Fill in:
| Field | Value |
|---|---|
| Name | Unique identifier using letters, digits, and underscores only (e.g. azure_event_hub). |
| Allowed URL patterns | *.servicebus.windows.net |
| Value | Event Hubs connection string from step 1 |
- Save the credential.
3. Create the Azure Event Hubs connector
- Go to Datasets → Connectors → Create Connector.
- Select Azure Event Hubs.
- Connector name: unique identifier (letters, numbers, underscores).
- Configure:
- Event Hub connection string: select the credential from step 2.
- Event Hub name: hub name from step 1.
- Consumer group: group to use (default
$Default, or your dedicated group).
- Check Deploy to start the streaming connector after save.
Partition checkpoints are stored automatically by the data plane (S3-backed). You do not configure checkpoint storage in the connector settings.
Microsoft security sources
Use Event Hubs for Microsoft security data that Microsoft exposes as append-only logs or event streams. This avoids timestamp-window polling and uses Event Hub partition offsets for bounded, resumable delivery.
The connector emits one raw Event Hub message to azure.eventhub.<eventHubName>. The original Microsoft payload remains under the record's body; Event Hub enqueue time, sequence number, and offset are retained alongside it. Choose stable, descriptive hub names because the hub name becomes the dataset suffix.
Microsoft Entra diagnostic logs
In the Microsoft Entra admin center, open Monitoring & health → Diagnostic settings, add a diagnostic setting, and select Stream to an event hub. Route the required categories:
| Perpetual data | Microsoft diagnostic category |
|---|---|
| Directory audit activity | AuditLogs |
| Interactive user sign-ins | SignInLogs |
| Non-interactive user sign-ins | NonInteractiveUserSignInLogs |
| Service-principal sign-ins | ServicePrincipalSignInLogs |
| Managed-identity sign-ins | ManagedIdentitySignInLogs |
| Risky users | RiskyUsers |
| User risk detections | UserRiskEvents |
| Risky service principals | RiskyServicePrincipals |
| Service-principal risk detections | ServicePrincipalRiskEvents |
Microsoft also supports categories such as ProvisioningLogs and MicrosoftGraphActivityLogs; enable them when those records are in scope. Available categories and licensing vary by tenant.
Use Event Hub as the only ongoing collector for these categories. Running equivalent Microsoft Graph polling in parallel creates overlapping records with different raw schemas. Diagnostic export begins from the point it is enabled and should not be assumed to provide a historical snapshot of current risky identities.
See Microsoft Entra logs available for streaming and stream Microsoft Entra logs to Event Hubs.
Microsoft Defender XDR event streaming
In the Microsoft Defender portal, configure Streaming API to send selected Advanced Hunting tables to the Event Hub. Supported tables include AlertInfo, AlertEvidence, device, email, identity, URL, and cloud-app event tables.
These events supplement the Microsoft Graph Security connector. AlertInfo and AlertEvidence are Advanced Hunting records, not the same objects as Graph /security/alerts_v2, and Event Streaming does not provide the same correlated /security/incidents resource.
See Microsoft Defender XDR Event Streaming and supported Event Streaming tables.
Delivery expectations
- Event Hubs and the connector provide at-least-once delivery, not exactly-once delivery.
- The connector flushes emitted records before updating the partition checkpoint. A crash after a successful flush but before checkpointing can replay the final uncommitted batch.
- Use a dedicated consumer group for every Perpetual connector instance.
- Prefer separate Event Hubs when sources require different retention, access, throughput, or dataset names.
Operational notes
- Delivery semantics: Events are emitted to Firehose, flushed, then checkpointed per partition. A flush failure does not advance the checkpoint.
- Multiple consumers: Use a dedicated consumer group per downstream consumer to avoid partition stealing.
- Connection string rotation: Update the shared access policy keys in Azure, then update the Perpetual credential.