Skip to main content
Microsoft Fabric is Microsoft’s unified data platform for Lakehouses, Warehouses, SQL databases, and real-time analytics. The Microsoft Fabric connector puts one GraphQL endpoint in front of everything you have wired into a Fabric API for GraphQL item, whether the data lives in a Lakehouse, a Warehouse, a SQL database, or a mirror of Snowflake. Microsoft Fabric is available as an app + chat connector: one shared connection that works in the chat while you build and in your published apps. With Microsoft Fabric, your app can:
  • Query data across Fabric Lakehouses, Warehouses, and SQL databases through a single GraphQL endpoint
  • Query mirrored databases (Azure SQL, Cosmos DB, Snowflake, Databricks) without managing per-source drivers
  • Create, update, and delete rows in SQL database tables and views, and invoke stored procedures, via GraphQL mutations
  • Fetch related data in one request through configured one-to-one, one-to-many, and many-to-many relationships
Authentication uses a Microsoft Entra service principal. Your credentials are stored securely in Lovable’s gateway and are never exposed to the browser or your app’s frontend code.

Common use cases and example apps

How Microsoft Fabric connections work

The connector talks to a single API for GraphQL item in your Fabric workspace. The tables, views, and relationships you add to that item become GraphQL types your app can query, so creating the item and adding your data to it is a prerequisite. Authentication uses OAuth2 client credentials with a Microsoft Entra service principal. Lovable exchanges the service principal’s credentials for a Fabric token with the scope https://api.fabric.microsoft.com/.default, so the connection can do exactly what the service principal has been granted in Fabric, nothing more.

What this means for data access

The service principal’s permissions determine what data is available to everyone who uses the connection. There is no per-user Microsoft login: every app and builder on the connection queries Fabric as the same principal. To segment access, create separate service principals or separate API for GraphQL items, each with its own Lovable connection. Microsoft Fabric uses Lovable’s gateway architecture for secure credential handling and automatic token refresh. See Gateway-based connectors for details on authentication and usage limits.
All queries made through this connector run against your own Microsoft Fabric environment using your service principal. Fabric usage, quotas, and billing are handled directly by Microsoft, not by Lovable.

How to connect Microsoft Fabric

Who can create Microsoft Fabric connections depends on your plan and workspace settings. App + chat connectors are available by default on Free, Pro, and Business plans. On Enterprise plans, they are effectively disabled at first: Who can create connections and clients defaults to No one until an admin changes it in Connectors → Admin settings → App + chat connectors.

Prerequisites

Before connecting, make sure you have:
  • A Microsoft Fabric workspace with an API for GraphQL item, with the Lakehouse, Warehouse, SQL database, or KQL database data you want to use added to it
  • A Microsoft Entra service principal and a client secret for it
  • A Fabric tenant admin who can enable Service principals can use Fabric APIs, if it is not already enabled
  • Introspection enabled on the API for GraphQL item (a Fabric workspace admin can enable it)
  • Permission to create connections in your Lovable workspace (see Who can create connections and clients)

Step 1: Set up Microsoft Entra and Fabric

Step 1 has two parts: create a service principal in Microsoft Entra, then prepare the API for GraphQL item in Fabric. Your app cannot connect until both are complete.

Create a service principal in Microsoft Entra

1

Register an application

Sign in to the Microsoft Entra admin center and register a new application, or reuse one you already have. See Microsoft’s guide: Create a Microsoft Entra application and service principal.
2

Note the tenant and client IDs

On the app’s Overview page, copy the Directory (tenant) ID and the Application (client) ID. You enter both in Lovable in Step 2.
3

Create a client secret

Go to Certificates & secrets → New client secret and copy the secret value right away; Microsoft shows it only once. The value functions like a password, so store it securely. Note the expiry date you choose: when the secret expires, the connection stops working until you create a new secret and update the connection in Lovable.

Prepare the API for GraphQL item in Fabric

1

Allow service principals to use Fabric APIs

Ask a Fabric tenant admin to open the Admin portal → Tenant settings → Developer settings and enable Service principals can use Fabric APIs for your app or for a security group that contains it. Without this setting, Fabric rejects every request from the service principal.
2

Create or open the API for GraphQL item

In your Fabric workspace, create an API for GraphQL item, or open an existing one, and add the Lakehouse, Warehouse, SQL database, or KQL database data your app needs. Only data added to this item is queryable through the connector.
3

Grant the service principal access

Share the API for GraphQL item with the service principal and grant it Run Queries and Mutations. If the API connects to its data source with single sign-on (SSO) connectivity, also grant the principal read access on the underlying data source, or write access if your app will run mutations.
4

Enable introspection

In the API for GraphQL item, go to API settings → Introspection (the gear icon in the item’s top menu), enable it, and confirm. Only a Fabric workspace admin can change this setting.
Fabric ships with introspection turned off, and this connector does not work without it. Lovable verifies every new connection by running a GraphQL introspection query, and the Lovable agent relies on introspection to discover your schema while it builds. If introspection stays off, the connection fails the moment you click Connect.
5

Copy the endpoint URL

In the API for GraphQL item, copy the public GraphQL endpoint URL. It looks like https://api.fabric.microsoft.com/v1/workspaces/<workspace-id>/graphqlapis/<api-id>/graphql and always ends in /graphql.

Step 2: Connect Microsoft Fabric to Lovable

1

Open Microsoft Fabric in Connectors

Open Connectors and select Microsoft Fabric. For the other places to open the catalog from, see Where to find connectors.
2

Add a connection

Click Add connection.
3

Name the connection

In Display name, enter a name that identifies this connection in Lovable (for example, Fabric Analytics).
4

Enter your credentials

  • Microsoft Entra Tenant ID: the Directory (tenant) ID from your Microsoft Entra tenant
  • Service Principal Client ID: the Application (client) ID of the service principal
  • Client Secret: the client secret value you generated for the service principal
  • Fabric GraphQL Endpoint: the full URL you copied from the API for GraphQL item, for example https://api.fabric.microsoft.com/v1/workspaces/<workspace-id>/graphqlapis/<api-id>/graphql. The URL must end in /graphql.
5

Choose who can use this connection

Under Who can use this connection, decide who in your workspace can use the connection:
  • Only you (default): only the person creating the connection can use it and its associated data.
  • Invite specific people: only you and explicitly added workspace members can use the connection and its associated data.
  • Invite entire workspace: click Invite entire workspace to make the connection available to everyone in your Lovable workspace.
See Who can use connections and clients for more information.
6

Connect

Click Connect. Lovable tests the connection immediately by running a GraphQL introspection query against your endpoint. If the test fails, the cause is almost always a skipped item in Step 1; see Troubleshooting.
When connected, you can link the connection to the projects where you want to use it, and start building apps that query your Fabric data.

Limitations

  • GraphQL API only. The connector calls your API for GraphQL item and nothing else: no Fabric REST API, no direct SQL or KQL endpoints, no OneLake file access. A table your app needs must be added to the API item first.
  • Writes work on SQL stores only. Create, update, delete, and stored procedure calls work against Fabric Warehouses, Fabric SQL databases, and Azure SQL databases. Lakehouses, KQL databases, and all mirrored sources are read-only.
  • The schema is what the API item owner exposed. Your app sees the tables, views, and relationships added to the API for GraphQL item, with the permissions granted to the service principal, and nothing more.
  • Platform ceilings. Fabric returns at most 100,000 rows per query across all pages, caps responses at 64 MB, and times out requests after 100 seconds.
  • No per-end-user Microsoft login. Everything built on a connection queries Fabric through the same shared service principal. Create separate connections with separate service principals to segment access.

Troubleshooting

Lovable verifies every Microsoft Fabric connection the moment you click Connect, so failures surface immediately and trace back to configuration in Fabric or Microsoft Entra. These are the most common:
The most common cause is introspection. Lovable verifies each new connection with a GraphQL introspection query, and Fabric ships with introspection disabled, so an untouched API for GraphQL item fails this test every time. The error message mentions that introspection is disabled.A Fabric workspace admin must open the API for GraphQL item, go to API settings → Introspection, enable it, and confirm. Then save the connection again in Lovable.
Fabric is refusing requests from the service principal. Ask a Fabric tenant admin to enable Service principals can use Fabric APIs for the app or a security group that contains it, and make sure the principal has been granted Run Queries and Mutations on the API for GraphQL item.
The service principal reaches the API but gets no data back. Grant it Run Queries and Mutations on the API for GraphQL item, and if the API connects to its data source with single sign-on (SSO) connectivity, also grant the principal read or write access on the underlying data source.
The endpoint URL was not copied correctly. Copy it again from the API for GraphQL item in Fabric and make sure it ends with /graphql.

Manage your connection

Connections are managed from Connectors: select , then open the connection.
  • Unlink projects to remove access from specific projects while keeping the connection available for others. See Unlink projects from a connection for the steps.
  • Delete the connection to remove it from the workspace entirely. Deleting is permanent. It removes the credentials from all linked projects, and app features that use stop working until a new connection is added. See Delete a connection for the steps and who can delete.