[Go to site: main page, start]

Skip to main content
Microsoft Fabric is Microsoft’s unified data platform for Lakehouses, Warehouses, and SQL databases. 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. 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 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. This connector has 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. If you need each end user to sign in with their own Microsoft account instead, use the Microsoft Fabric app user connector. 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 backed by a Fabric capacity: an F SKU, a Fabric trial capacity, or a Power BI Premium P SKU with Fabric enabled. Power BI Pro and Premium Per User (PPU) workspaces cannot host an API for GraphQL item, because neither provisions a Fabric capacity.
  • An API for GraphQL item in that workspace, with the Lakehouse, Warehouse, Fabric SQL database, mirrored database, or Azure SQL database data you want to use added to it
  • The Users can create Fabric items tenant setting enabled, if you still need to create the API for GraphQL item. A Fabric admin or capacity admin turns it on under Admin portal → Tenant settings → Microsoft Fabric.
  • A Microsoft Entra service principal and a client secret for it
  • A Fabric tenant admin who can enable Service principals can call Fabric public 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 call Fabric public APIs

Ask a Fabric tenant admin to open Admin portal → Tenant settings → Developer settings and enable Service principals can call Fabric public APIs for your app or for a security group that contains it. Without this setting, Fabric rejects every request from the service principal.Microsoft enables this setting by default for new tenants, so it may already be on. Do not confuse it with the similarly named Service principals can create workspaces, connections, and deployment pipelines setting, which covers different APIs and which this connector does not need.
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, Fabric SQL database, mirrored database, or Azure SQL database data your app needs. Only data added to this item is queryable through the connector, and Fabric’s API for GraphQL supports only those data sources.If your app writes to a Fabric Warehouse, define a primary key on each table you add first. Fabric generates mutations for Warehouse tables only when a primary key exists, so a table without one is queryable but not writable.
3

Grant the service principal access

In your Fabric workspace, select the ellipsis () next to the API for GraphQL item and choose Manage permissions → Add user. Search for the service principal by its app registration name, select Run Queries and Mutations, then select Grant. See Microsoft’s guide: Use service principals with Fabric API for GraphQL.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 endpoints, no OneLake file access. A table your app needs must be added to the API item first.
  • Only Fabric’s supported data sources. Fabric’s API for GraphQL exposes Fabric Warehouses, Fabric SQL databases, Fabric Lakehouses, Fabric mirrored databases, and Azure SQL databases. Real-Time Intelligence stores such as Eventhouses and KQL databases are not supported, so you cannot query them through this connector.
  • 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 and all mirrored sources are exposed through SQL analytics endpoints and are read-only. Fabric generates mutations per writable table, so a view stays read-only even when it lives in a SQL store.
  • Warehouse tables need a primary key to accept writes. In a Fabric Warehouse, Fabric generates create, update, and delete fields only for tables that have a defined primary key. A Warehouse table without one appears in the schema with read fields only, so define the primary key in the Warehouse and refresh the API item’s schema before your app tries to write to it.
  • 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 100 items per request by default, returns at most 100,000 rows per query across all pages, caps responses at 64 MB, and times out requests after 100 seconds. It also limits each query to 10 levels of nesting, which is the ceiling on how far your app can traverse relationships in a single request, and allows at most 1000 attached objects per API for GraphQL item. See Fabric’s API for GraphQL limitations for the full list.
  • This connector has 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, or use the Microsoft Fabric app user connector so each end user signs in with their own Microsoft account and queries under their own Fabric permissions.

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.

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 call Fabric public APIs under Admin portal → Tenant settings → Developer settings 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.