Linking Microsoft Azure (Application Insights) as a source

Let AI connect your sources for you

Skip the manual setup — run this in your project and the wizard auto-detects your databases and APIs and connects them to PostHog.

Learn more
PostHog Wizard hedgehog

Alpha release

This source is currently in alpha. The interface and available tables may change.

The Azure Application Insights connector syncs your application telemetry – requests, dependencies, exceptions, and availability results – into the PostHog data warehouse. This enables you to analyze your application monitoring data alongside your product analytics.

Prerequisites

Before connecting, you need:

  1. A Microsoft Entra app registration with the Reader role assigned on your Application Insights resource. Follow Microsoft's authentication setup for instructions.

  2. A client secret for the app registration. Create one under App registrations > Certificates & secrets in the Azure portal.

  3. Your Application Insights application ID. Find it under API Access in your Application Insights resource in the Azure portal.

Note: Only Azure public cloud is supported (api.applicationinsights.io). Sovereign clouds (government, China) are not supported.

Adding a data source

  1. In PostHog, go to the Sources tab of the data pipeline section.
  2. Click + New source and click Link next to this source.
  3. Enter your credentials (see Configuration below) and click Next.
  4. Select the tables you want to sync, choose a sync method and frequency, then click Import.

Once the syncs are complete, you can start querying this data in PostHog.

When linking Azure Application Insights, you'll need:

  • Tenant ID – your Microsoft Entra (Azure AD) tenant ID.

  • Client ID – the application (client) ID of your Microsoft Entra app registration.

  • Client secret – the client secret you created for the app registration.

  • Application Insights application ID – the application ID from the API Access section of your Application Insights resource (this is different from the Azure resource ID).

Available tables

TableDescriptionSync method
requestsIncoming application requests, with their duration and resultIncremental
dependenciesCalls to external services or storage, with their duration and resultIncremental
exceptionsApplication exceptions and their diagnostic detailsIncremental
availabilityResultsAvailability test results that measure application responsiveness and uptimeIncremental

All tables support both incremental and full refresh sync. Incremental syncs only fetch new or updated records using the timestamp field.

Sync modes

Each table can be synced in one of several modes, depending on what the source supports:

  • Webhook (when available) – the source pushes changes to PostHog in real time. Fastest freshness, lowest ongoing cost, and the only mode that reliably captures updates and deletes.
  • Incremental – only new or updated rows are synced on each run, using a cursor field (such as an updated_at timestamp). Cheaper than a full refresh, but deletes aren't captured.
  • Append only – new rows are appended using a cursor field; existing rows are never updated. Ideal for immutable, append-only tables like event logs.
  • Full refresh – the whole table is reloaded on every sync. Use it when a table has no reliable cursor or when you need deletions reflected.

See sync methods for a full explanation of how each mode works and how to choose between them.

Sync limitations

  • Each sync reads at most the last seven days of telemetry, including full refresh. To import older telemetry, use a separate Azure export.

  • Incremental syncs repeat the previous hour before the last saved timestamp to capture delayed telemetry. Data that arrives more than one hour late may be missed.

Configuration

OptionTypeRequired
Tenant IDtextYes
Client IDtextYes
Client secretpasswordYes
Application Insights application IDtextYes

Supported tables

TableDescriptionSync methodIncremental fieldPrimary key
requests

Incoming application requests, with their duration and result.

Incremental, Full refreshtimestamp—
dependencies

Calls to external services or storage, with their duration and result.

Incremental, Full refreshtimestamp—
exceptions

Application exceptions and their diagnostic details.

Incremental, Full refreshtimestamp—
availabilityResults

Availability test results that measure application responsiveness and uptime.

Incremental, Full refreshtimestamp—

Troubleshooting

  • Authentication error: Your tenant ID, client ID, or client secret is incorrect or the secret has expired. Verify them in the Azure portal under App registrations, then reconnect.

  • Permissions error: Your Microsoft Entra app does not have the Reader role on the Application Insights resource. Assign the role under Access control (IAM) on the resource, then reconnect.

  • Application not found error: The Application Insights application ID is incorrect or the app registration does not have access. Check the ID under API Access in your Application Insights resource.

If your sync is failing or data looks wrong, see the Data warehouse troubleshooting guide. If that doesn't help, contact support – we're happy to help.

Still have questions?

Was this page useful?