How to enable logging / see generated SQL when calling Fabric Data Agent via REST API
Hello Microsoft Fabric Team,
We are integrating the Fabric Data Agent via REST API (C# HTTP calls) instead of using the SDK. We’d like to see the actual SQL / DAX / KQL queries that the agent generates internally when responding to a request.
Could you please clarify:
Is there a supported logging mode (e.g. debug / trace) or diagnostic setting that surfaces the generated query text (SQL / DAX / KQL) in the REST API flow?
If so, how do we enable that logging (e.g. via HTTP request headers, query parameters, or tenant setting)?
Where are the logs surfaced (e.g. Azure Monitor, Fabric service logs, or response metadata)?
Are there permissions or preview-mode constraints around logging query generation for data agents?
If this is not currently supported, is there a roadmap or recommended workaround for obtaining the generated query text (for auditing / debugging)?
For reference, we’re following the “Use the AI skill programmatically” tutorial in your docs: https://free.blessedness.top/en-us/fabric/data-science/data-agent-end-to-end-tutorial#use-the-ai-skill-programmatically
Best regards,
Durjan