Skip to content

Azure OpenAI

There are two ways to bring Azure OpenAI and Azure AI Foundry usage into PromptGlass. The connector reads diagnostic logs, Azure Monitor metrics and Cost Management data, and needs no changes to your apps. The gateway in API mode gives request-level attribution, DLP and budgets. Most organizations use both: the connector for complete coverage, and the gateway for the apps that need enforcement.

  1. On each Azure OpenAI resource, add a diagnostic setting that sends RequestResponse and Audit logs plus AllMetrics to an Event Hub (streaming) or a storage account.
  2. Create a service principal with:
    • Reader on the subscriptions or management group
    • Monitoring Reader
    • Cost Management Reader
    • Azure Event Hubs Data Receiver on the Event Hub (if streaming)
  3. Add the connector:
Terminal window
promptglass connectors add azure-openai \
--tenant-id <tenant> --client-id <app> --client-secret-env AZ_SECRET \
--management-group mg-ai --eventhub-namespace acme-ai-logs --eventhub aoai-diag
Source Data
Diagnostic logs Caller IP, operation, deployment, model, status, duration, token counts, caller identity for Entra ID-authenticated calls
Azure Monitor metrics ProcessedPromptTokens, GeneratedTokens, throttling, provisioned utilization
Cost Management Billed cost by resource and meter, PTU reservations
Resource Graph Inventory of every Azure OpenAI and AI Foundry resource and deployment

Using Azure OpenAI as the approved destination

Section titled “Using Azure OpenAI as the approved destination”

A common pattern routes risky consumer AI usage to the company’s own Azure OpenAI deployment. A policy uses action: route to send matching gateway traffic to a named Azure target:

targets:
azure-openai-eu:
type: azure-openai
endpoint: https://acme-eu.openai.azure.com
deployment: gpt-4o
auth: { managedIdentity: true }

See policy examples.

When you use PTUs, PromptGlass shows utilization by team over time, so you can right-size reservations or move bursty workloads to pay-as-you-go deployments.