Microsoft Azure API Management

Microsoft Azure API Management

Beta
Beta release

This source is currently in beta. It works end to end, but you may still hit rough edges. Let us know if you do.

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

Connect Microsoft Azure API Management to PostHog to sync your data into the PostHog data warehouse for analysis and modeling.

Sync Azure API Management gateway logs into the PostHog Data warehouse: requests, LLM token usage, and WebSocket connections.

API Management must send its logs to a Log Analytics workspace. In the API Management instance, add a diagnostic setting that sends the GatewayLogs, GatewayLlmLogs and WebSocketConnectionLogs categories to the workspace, with Resource specific as the destination table.

Register an app in Microsoft Entra ID, create a client secret for it, and give its service principal the Log Analytics Reader role on the workspace. Then enter the directory (tenant) ID, the application (client) ID, the secret value, and the workspace ID from the workspace's Overview page.

Configuration

OptionTypeRequired
Directory (tenant) IDtextYes
Application (client) IDtextYes
Client secretpasswordYes
Workspace IDtextYes

Linking Microsoft Azure API Management to PostHog

  1. Go to the Data pipeline page in PostHog
  2. Click New source and select Microsoft Azure API Management
  3. Fill in the required configuration fields
  4. Click Next, select the tables you want to sync, and then press Import

Supported tables

TableDescriptionSync methodIncremental fieldPrimary key
ApiManagementGatewayLogs

One row per request that passed through the API Management gateway, with timings, response codes, and the API, operation, product, and subscription it matched.

Incremental, Full refresh_IngestionTime—
ApiManagementGatewayLlmLog

One row per language model request that passed through the API Management AI gateway, with token counts and the model used.

Incremental, Full refresh_IngestionTime—
ApiManagementWebSocketConnectionLogs

One row per WebSocket connection event that passed through the API Management gateway.

Incremental, Full refresh_IngestionTime—