Microsoft Fabric / AI and application lessons

Microsoft Fabric Data Agent Tutorial (2026 Guide)

Build a small, checkable Q&A agent before connecting a large catalog. Use the course's clean orders table, inspect the generated query, and prove that a restricted reader cannot see data they should not access. A fluent answer is not an acceptance test.

Documentation reviewed 2026-10-30. Start small, inspect the evidence, test the permission boundary.

1. What a Data Agent does, and where it stops

A Fabric data agent is a configurable Fabric item that routes a natural-language question to selected data, generates and validates a query, executes it using the applicable calling identity and returns an answer. SQL, DAX and KQL serve relational, semantic-model and Eventhouse scenarios; supported ontology and Microsoft Graph experiences provide additional context/source paths.

The data agent is read-only. It is not a pipeline trigger, a database write API or an automatic root-cause detector. Asking why sales fell does not prove causation from a few returned rows. Review the data and query before using the answer for a financial or operational decision.

A standalone data agent does not require an ontology. A preview ontology can help several consumers share business entities and definitions, but a single curated table is a better first exercise. For an application that must write state, see Fabric Apps rather than trying to make the data agent update records.

2. Supported sources and permission boundaries

Add up to five sources in total, in a supported combination. The current source documentation covers Lakehouse, Warehouse, SQL database in Fabric, mirrored database, Power BI semantic model, Eventhouse KQL database, ontology and Microsoft Graph scenarios. Check the source picker and source-specific documentation for the path you need rather than treating every source as interchangeable.

Source/pathWhat to prepareImportant distinction
Lakehouse / relational Fabric sourcesRelevant, readable tables with clear names and stable schemaStandalone CSV/JSON/PDF files are not a table-query source. SQL paths use the relevant relational surface.
Power BI semantic modelTrusted measures, descriptive metadata and model-level Read permissionDirect data-agent queries need Read, not Build or membership in the model’s workspace. Ontology generation has different permission requirements.
Eventhouse KQL databaseSelected tables, time filters and useful UDFsRead-only queries do not start anomaly jobs, notebooks or write workflows.
OntologyValid definitions, bindings and source accessA context layer is not an automatic copy of all bound data or an unrestricted cross-source join engine.
Shortcuts / accepted cross-tenant sharesSupported tables exposed through OneLake and permission to read themMirroring every external source into a new local copy is not mandatory.

Do not require every source to reside in the agent’s workspace. Supported sources can be selected through the catalog, but the concepts documentation says queries fail when the source workspace’s capacity is in a different region from the agent’s capacity. Same tenant, same workspace and same region are different requirements.

For Microsoft Graph or external connection paths, workspace outbound access protection and administrator-approved connection rules can apply. A tenant-approved source is not proof that your current identity can query it.

3. Prerequisites and the orders contract

  • A paid F2 or higher capacity, or P1-or-higher Power BI Premium capacity with Fabric enabled. Do not plan this exercise on a Trial capacity.
  • Permission to create/edit the data-agent item and read the selected data. Avoid granting Admin merely to ask questions; consumer permissions differ from authoring permissions.
  • The required Copilot/Azure OpenAI tenant and capacity settings. Cross-geo processing and storage settings depend on your capacity’s geography; the documented outside-US/EU case requires both permissions. Have the administrator review the policy rather than enabling every cross-geo switch blindly.
  • No separately supplied Azure OpenAI key is required for in-product chat. Fabric manages that AI service.

Reuse dbo.uig_silver_orders from the notebook lesson. It contains three valid unique orders: 1001/UK/120.00, 1002/US/75.00 and 1003/UK/50.00. Expected total: 245.00. The five-row Bronze source includes an exact duplicate and a negative reject, so selecting it without the cleaning contract produces a different answer.

Open the table and note its actual schema/column names before authoring examples. If the source does not match these known values, stop and resolve the data discrepancy rather than teaching the agent to repeat 245.00 regardless of the database.

4. Create and configure a focused agent

  1. In the practice workspace, choose New item, search for Fabric data agent, and name it UIG_Orders_QA_Demo.
  2. From OneLake catalog, add the practice Lakehouse. In Explorer, select only dbo.uig_silver_orders for this first exercise. Avoid parent-level selection that unintentionally exposes unrelated tables to the agent’s scope.
  3. Confirm that the agent sees the table’s current schema. After a schema change, use the source’s Refresh action and recheck selections.
  4. Add concise instructions defining grain, metric meaning and ambiguity handling. Use the actual table/column names from your environment.
  5. For supported SQL/KQL sources, add a few validated question-query pairs where needed. Examples are not precomputed answers or model retraining.
  6. Start on the standard runtime. Run the acceptance questions below, inspect intermediate steps and compare with the table before publishing.
Use the curated Silver orders table for this practice domain.
One row represents one valid, unique order.
For this exercise, total order amount means the sum of its amount column.
Group regional questions by the region column.
Do not use the Bronze or rejected-orders table to calculate sales.
If the requested metric, period or source is not defined, ask for clarification.
If a query fails or access is denied, say so; do not invent a result.
Do not claim that a correlation proves a business cause.

These are behavioral instructions, not security controls. A rule such as never show email is not a substitute for source-enforced access restrictions. Also, do not hardcode the expected 245.00 into instructions or examples as a response the model must always return.

5. Instructions, examples and runtime-specific limits

Agent-level instructions currently allow up to 15,000 characters. Supported sources allow up to 100 example queries per source, but the current create guide excludes Power BI semantic models and ontologies from the sample question-query editor. Validate SQL/KQL syntax and schema; unvalidated examples are not used.

For Power BI, improve the model’s measures/metadata and its supported AI preparation rather than promising a sample SQL editor for the model. For a SQL source, a small set of correct examples is more useful than filling the maximum with near duplicates.

RuntimeUse it forCurrent documented behavior
Standard, GAA stable baseline and controlled production behaviorConcepts documentation describes conversational output capped at 25 rows and 25 columns.
PreviewEvaluate upcoming routing/query-generation changesRuntime documentation lists query results up to 1,000 rows, schema descriptions, topic context and advanced SQL/DAX behavior.

The larger query-result limit is not a guarantee of a 1,000-row chat export or a new column limit. The interface may summarize results. Use the exact runtime documentation and returned query/output for the test you are running.

Runtime selection does not let you choose the underlying LLM; model upgrades apply across both runtimes. The published agent retains the runtime selected when it was published. Changing a draft setting is not enough: test and republish to change the consumer version.

Code Interpreter and other preview capabilities have separate scope and enablement. Do not advertise every Data Agent as a Python runtime, forecasting service or replacement for notebooks merely because a related feature exists.

6. Acceptance tests: answers, query evidence and denied access

Question or testExpected resultWhat to inspect
How many valid unique orders are in the curated table?3Correct Silver source; no accidental Bronze duplicate.
What is the total order amount?245.00A source aggregation, not addition of a truncated display sample.
Show total order amount by region.UK 170.00; US 75.00Grouping, numeric amount and no duplicate-producing join.
What is net profit after tax?Clarification or an explicit statement that the required data/definition is absent.No invented tax rate, cost column or profit formula.
Delete order 1001.No data modification.The Data Agent stays read-only and the source still contains the record.
Repeat as a restricted test identity.Only that identity’s permitted data, or explicit access denial.Use a genuinely restricted source role; a workspace Admin/Member test does not prove RLS.

Expand the intermediate steps to review the selected source and generated SQL/DAX/KQL. Record question, runtime, query, result, identity/role and pass/fail. Re-run the same set after an instruction, schema, runtime or deployment change.

For an actual RLS test, provision a separate approved restricted source/model and identity using its supported security mechanism. If it exposes UK orders only, the expected result for that reader is two orders totaling 170.00. A second administrator account is not a restricted reader.

When answers appear anchored to an earlier truncated conversation, start a new chat. Clearing chat deletes that history; record non-sensitive test evidence first. The values above are reference acceptance checks, not a claim that this article executed queries in your tenant.

7. Publish, share and maintain the right version

After answer and permission tests pass, select Publish and give the agent a useful domain description. Fabric maintains a draft and a published version. Consumers and external orchestrators use the published version; continue refining the draft, then retest and republish deliberately.

Grant the consumer access to the agent and its underlying sources. Sharing the agent does not grant data permissions. For direct semantic-model queries through a data agent, model Read permission is sufficient and Build is not required; do not carry that exception into ontology generation or other Power BI entry points.

Git integration, deployment pipelines and built-in diagnostics support agent lifecycle management. Version the instructions, examples and source selection. After promotion, verify target source bindings, identity permissions, runtime and published behavior rather than assuming a successful pipeline preserved every environment-specific reference.

Review source query cost as well as AI/capacity consumption. Narrow scope, useful KQL time filters and precise questions are better starting points than repeatedly submitting broad scans. Do not promise a fixed price per answer without measuring the actual workload.

8. User access and preview service-principal authentication

In-product chat uses the signed-in user’s Entra identity; no application token is needed from the reader. Source security applies for the execution identity and access path. Source RLS/OLS/CLS and supported Purview restrictions are not overridden by agent instructions, but an elevated role may legitimately have broader access than a restricted reader.

Microsoft also documents service-principal authentication in preview for a published data agent. It requires the tenant’s Fabric API setting, workspace access and explicit source access for that principal. The source permissions belong to the app identity, not automatically to each end user of your frontend.

  • Managed identities are not currently supported for this data-agent authentication scenario.
  • Service-principal authentication is not yet supported for data agents connected to a KQL database.
  • Use approved certificates/federation or securely managed secrets according to the supported flow; never embed an app secret in browser code or a notebook shared with readers.
  • Do not replace user-scoped access with a broad service principal merely to bypass a connection or deployment error.

A feature supporting service principals does not mean every downstream connector supports them. Confirm the integration-specific authentication flow. The current Foundry Fabric IQ portal connection, for example, documents delegated user authentication.

9. Foundry, Copilot Studio and compliance boundaries

Action for existing Foundry users: the older Microsoft Fabric tool integration that connects a single data agent by workspace/artifact ID is retiring on 6 November 2026. Microsoft directs users to Fabric IQ (OneLake Catalog). This deadline concerns the older integration, not the Data Agent product.
  1. First prove the published agent works in Fabric.
  2. In a Foundry agent, add the Fabric IQ (OneLake Catalog) tool and configure its connection.
  3. Select the published data agents visible to the authorized identity. The replacement can expose several agents as MCP tools; it is not limited to the old one-agent path.
  4. Use the same tenant and the documented delegated user flow. Check Foundry project/connection roles plus agent/source permissions.
  5. Repeat the same known-answer and denied-access tests from Foundry, not only from Fabric. Inspect the orchestration trace and whether the correct published agent was invoked.

Copilot Studio and Microsoft 365 have their own supported connectors, permissions and publication steps. Teams access may be provided through an orchestrator; publishing in Fabric does not automatically create a Teams bot.

When a data agent is consumed through Foundry, Copilot Studio, M365 or another non-Fabric service, answers can be sent outside Fabric’s geographic/compliance boundary and processed or stored under that service’s terms. Tenant approval and supported Purview controls still matter, but do not claim that data can never leave Fabric.

Do not keep a retiring SDK/class example as the recommended production route or assert that all Foundry deployments require app-only authentication. Follow the current integration documentation.

10. Diagnose the failure before broadening access

SymptomCheck firstAvoid
Item missing or creation blockedPaid capacity, tenant/capacity AI settings, geographic requirements and authoring access.Assuming a Trial capacity qualifies.
Source missing or query deniedSource Read permission, supported source path, same-region requirement and connection allow rules.Granting Admin to every user.
Wrong totalSelected table grain, duplicates, filters, source measure and generated query.Hardcoding the desired answer into instructions.
Only a small result shownRuntime, query result versus chat output and prior conversation.Advertising the agent as a complete export tool.
New instructions not seen by consumersDraft versus published version and last republish.Assuming draft edits change the published endpoint.
Foundry route failsRetiring versus replacement tool, published agent, delegated identity and project/source access.Reusing obsolete SDK examples or swapping in a privileged principal.

Other documented limitations include English-only support, no direct unstructured document querying, no user-selected LLM, and conversation history that may reset after service/model changes. Purview policies can prevent queries or limit surfaced data. Treat an incomplete answer as a diagnostic signal, not proof that no business records exist.

A Data Agent answers questions on demand. An operations agent monitors conditions and has separately configured action behavior. Neither the old universal five-minute monitoring claim nor automatic autonomous writes belongs in the definition of a Data Agent.

Common questions

Is Microsoft Fabric Data Agent generally available?

Yes. Microsoft Learn describes the core Data Agent and standard runtime as generally available. The preview runtime, service-principal authentication and some integrations/features have separate preview status.

Does every response have a 25-row limit?

The concepts documentation describes conversational outputs capped at 25 rows and 25 columns. The preview runtime documentation now lists query results up to 1,000 rows. Query results and displayed chat output differ, so this is not a guaranteed 1,000-row export or a new column limit.

Do sources have to be in the agent's workspace?

Not universally. Supported sources can be selected through the catalog, including supported shortcut-backed and shared tables. Permissions and source-specific support apply; the documented cross-region capacity restriction still matters.

Do I need Build permission on a semantic model?

For direct data-agent queries against a Power BI semantic model, Read is sufficient; Build and membership in the model's workspace are not required. Generating or querying an ontology from a semantic model is a different path that currently requires Read and Build.

Can a service principal call any Data Agent source?

No. Service-principal authentication is preview, requires workspace and explicit source access, and is not yet supported for agents connected to a KQL database. Managed identities are not currently supported for this scenario.

What is changing for Foundry integrations?

Microsoft is retiring the older Microsoft Fabric tool connection to a single Data Agent on 6 November 2026. Use the documented Fabric IQ OneLake Catalog replacement, which supports selecting published agents and uses delegated user authentication in its portal flow. Test answers, permissions and data handling after migration.

Official references and review scope

Checked against the following official vendor documentation on 2026-10-30. This is an independent learning guide, not a Microsoft certification, benchmark or customer deployment report. These workflows have not been executed in your tenant. Expected values are teaching acceptance checks; validate feature availability, identity, network, schema, data handling and recovery requirements before production use.

Scroll to Top