KBAISE/ for lovable
Library
Docs

Connect your app to Microsoft Fabric

about 15 minBuildingchecked 3d agoOfficial page
The short version

Connect your Lovable app to Microsoft Fabric to query and manage data across your warehouses, lakehouses, and SQL databases. It uses a single secure connection to run operations without exposing credentials in your frontend code.

Anyone who wants to build internal tools, forms, or reporting dashboards powered by data stored in Microsoft Fabric.

Do this, in order

  1. 1

    Register a new application in the Microsoft Entra admin center and copy its Directory (tenant) ID, Application (client) ID, and a new client secret value.

    Lovable needs these service credentials to authenticate with Microsoft Fabric in the background.

  2. 2

    Ask a Fabric tenant admin to enable 'Service principals can call Fabric public APIs' under Developer settings in the Fabric Admin portal.

    Without this setting turned on, Fabric rejects all incoming requests from automated application accounts.

  3. 3

    Open your Fabric workspace, create or open an API for GraphQL item, add your required tables, and enable Introspection under API settings.

    Lovable discovers your data structure through introspection, and the connection fails immediately if introspection is turned off.

  4. 4

    Grant your application registration 'Run Queries and Mutations' permissions on the API for GraphQL item, then copy the endpoint URL ending in '/graphql'.

    This permits your application account to access the API endpoint and read or update data.

  5. 5

    In Lovable, navigate to Connectors, select Microsoft Fabric, click Connect, and enter your Tenant ID, Client ID, Client Secret, and the GraphQL endpoint URL.

    This saves and verifies your credentials inside Lovable's secure gateway.

  6. 6

    Link the Microsoft Fabric connection to your project in Lovable and ask the chat to build interfaces using your connected data.

    Linking makes the connection available to the AI builder and the published application.

Paste this into your project

Use Microsoft Fabric and build an operations dashboard that queries our Warehouse for daily orders, fulfillment status, and inventory levels. Include summary metric cards at the top and a filterable table of recent orders.

Words decoded

Service principal
An automated system identity used by apps to log in and access cloud resources without a human entering a username and password.
API for GraphQL
A single web address provided by Microsoft Fabric that lets your app request exactly the data it needs across multiple tables.
Introspection
A setting that allows external tools like Lovable to inspect your database structure so they know what tables and fields exist.
Mutation
A command that creates, updates, or deletes records instead of just reading them.

Where people get stuck

  • Fabric disables introspection by default; forgetting to enable it in the API item settings causes the connection test in Lovable to fail immediately.
  • The Fabric GraphQL Endpoint URL must end with '/graphql' or Fabric returns a 404 error.
  • If you want your app to write or update data in a Fabric Warehouse table, that table must have a primary key defined, or Fabric keeps it read-only.
  • Lakehouses and mirrored databases are read-only through this API; updates and inserts only work on SQL databases and Warehouses.
  • Client secrets expire on the schedule chosen in Entra; once expired, the connection stops functioning until you generate a new secret and update Lovable.
  • All users of your app query Fabric using the same shared service principal permissions, rather than their personal Microsoft logins.

The short version, steps, decoder and prompt on this page are written automatically from Lovable's own documentation and can lag or misread it. The official page is always the authority.