How to enable logging / see generated SQL when calling Fabric Data Agent via REST API

Durjan Hussain 10 Reputation points
2025-10-13T08:21:38.1666667+00:00

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

Azure Service Fabric
Azure Service Fabric
An Azure service that is used to develop microservices and orchestrate containers on Windows and Linux.
{count} votes

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.