Hi Kab,
Welcome to Microsoft Q&A!
It's great to hear that you've already enabled Log Analytics and configured Request + Response logging for your Azure OpenAI resource. You're on the right track!
To view detailed logs of your model calls (inputs and outputs) in a way similar to OpenAI platform logs, here's how you can go deeper:
Step-by-step: View Model Call Logs with Request & Response Details
- Confirm Diagnostic Settings Ensure you have enabled logging to a Log Analytics workspace and selected:
- AllLogs
- AuditLogs
- RequestResponseLogs (this is critical for payload visibility)
- Use KQL to Query Logs You can use the following refined KQL query to retrieve request and response content:
AzureDiagnostics
| where ResourceProvider == "MICROSOFT.COGNITIVESERVICES" | where OperationName == "Completions_Create" or OperationName == "ChatCompletions_Create" | project TimeGenerated, Resource, OperationName, ResultType, requestPayload_s, responsePayload_s | order by TimeGenerated desc
> `requestPayload_s` contains the **prompt or chat messages**
> `responsePayload_s` shows the **model's generated response**
**Filter or Expand** You can also add filters like `ResultType` or `Resource` to narrow down by success/failure or specific resource group.
**View in Azure Monitor or Workbook** For ongoing monitoring, you may pin this query to a workbook or dashboard for better visibility.
Please note the below items:
Logs may take a few minutes to appear after execution.
If you're not seeing `requestPayload_s` or `responsePayload_s`, double-check that **"RequestResponseLogs"** is enabled in your diagnostics settings.
Some sensitive data may be redacted for compliance.
Please refer the below articles if thats useful too
[Supported Logs for Cognitive Services](https://learn.microsoft.com/en-us/azure/azure-monitor/reference/supported-logs/microsoft-cognitiveservices-accounts-logs)
[Log Analytics KQL Reference](https://learn.microsoft.com/en-us/azure/azure-monitor/logs/log-query-overview)
[Azure AI Engineer Certification Guide](https://learn.microsoft.com/en-us/credentials/certifications/azure-ai-engineer)
Feel free to follow up if you'd like help customizing your query further or exporting results! Happy building with Azure OpenAI.
Regards,
**Bhargavi Chakaravarthi Rangarajan**
- If this answer helped you, please consider clicking **"Accept Answer"** and **upvoting** it so others in the community can benefit too.