An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
Hi Sen0299 ,
The Azure AI Foundry Portal doesn't have a built-in view that shows the actual prompt and response text by default — the Monitor/Metrics tabs only show counts (request count and token metrics like Processed Prompt Tokens / Generated Completion Tokens), never the message content. Capturing the raw text is opt-in, and it's not retroactive — only calls made after you enable it are captured. You have a few options:
- Stored Completions (closest to an in-portal experience) — add
store=Trueto your chat call. The prompt and response are then stored and viewable inside Foundry (and can be reused for distillation/fine-tuning):
completion = client.chat.completions.create(
model="gpt-4.1-mini", # your deployment name
store=True,
metadata={"user": "admin", "category": "audit"},
messages=[...]
)
Docs: https://learn.microsoft.com/azure/ai-foundry/openai/how-to/stored-completions
- Diagnostic logging to Log Analytics — on the resource, add a Diagnostic Setting to a Log Analytics workspace with RequestResponseLogs enabled, then:
AzureDiagnostics
| where ResourceProvider == "MICROSOFT.COGNITIVESERVICES"
| where OperationName in ("Completions_Create","ChatCompletions_Create")
| project TimeGenerated, OperationName, ResultType, requestPayload_s, responsePayload_s
| order by TimeGenerated desc
requestPayload_s is the prompt, responsePayload_s is the output. Two things to know: the payload fields can be redacted for compliance or occasionally not populate, and Playground calls bypass this logging — so it's best for API traffic, not the portal Playground.
- Tracing / Observability (Application Insights) — connect App Insights to your Foundry project and enable content recording (
AZURE_TRACING_GEN_AI_CONTENT_RECORDING_ENABLED=true) to see prompt + completion text under Tracing. Great if you're building an app/agent. - Log it yourself — capture
messagesandresponse.choices[0].message.contentdirectly in your code (or route through API Management with body logging). This is the most deterministic and lets you mask PII before storing.
For your case (GPT-4.1-mini, tied to an API key), Stored Completions (#1) is usually the quickest way to see the actual text in Foundry. If you need durable audit logs, combine it with diagnostic Request/Response logging (#2).
A couple of questions to tailor this:
- Are the calls coming from your own app/API or from the Foundry Playground? (Playground bypasses diagnostic logging)
- Is this for debugging, audit/compliance, or fine-tuning? That changes which option fits best.
Kindly let us know if the above helps or you need further assistance on this issue.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".