👤 Who is this for?

Application Developer Data Engineer Full-Stack Developer — This page covers Fabric Apps (Preview): building custom HTML/TypeScript applications that run inside Microsoft Fabric, powered by the Rayfin SDK for backend-as-a-service.

Overview

Fabric Apps (Preview)

Build and deploy data-driven HTML applications directly inside Microsoft Fabric — with managed backend, authentication, and hosting.

What Are Fabric Apps?

Fabric Apps is a new development platform within Microsoft Fabric that lets you build complete data-driven applications without managing infrastructure. You define data models in TypeScript, and Fabric generates the database, GraphQL APIs, authentication, and static hosting automatically.

🏗️ Code-First Backend

TypeScript decorators define your data models, auth rules, and APIs. No SQL migrations, no ORM config, no API boilerplate.

🌐 Static HTML Hosting

Your frontend (React, Vite, plain HTML/JS) is built and served from OneLake storage at a public URL with Fabric SSO.

🔐 Built-in Auth

Microsoft Entra ID SSO, session management, and token handling — all included. Row-level security via @role decorators.

📊 OneLake-Native

The app's SQL database is fully integrated with OneLake, and static assets are served from OneLake storage. Microsoft documents the storage integration but does not document querying app tables from a notebook or lakehouse.

⚠️ Preview Status

Fabric Apps is currently in preview. Not all regions are supported. A Fabric tenant administrator must enable the Fabric Apps workload in Tenant settings before users can create items.

Releases

Recent Fabric Apps Releases

Fabric Apps ships fast. Here's what landed most recently — and what it changes for you.

The Rayfin toolchain (@microsoft/rayfin-cli, @microsoft/rayfin-client, @microsoft/rayfin-mcp) is currently at v1.34.0. Everything below is still Preview — there is no GA milestone published for Fabric Apps.

Anonymous Data Access

⚠️ Off by default — and it should usually stay that way

Fabric Apps can now expose data without requiring the caller to sign in, which unlocks genuinely public apps: status pages, public catalogs, marketing-facing dashboards. It is governed by a tenant setting that is disabled by default and must be deliberately switched on by a Fabric administrator.

Treat this as a data-exfiltration control, not a convenience toggle. Anything reachable through an anonymous endpoint is reachable by anyone with the URL. Enable it per-app, scope the models it exposes to the absolute minimum, and never combine it with a model that carries row-level personal or commercial data.

The Data App Template

Alongside the default template there is now a purpose-built data app starter, scaffolded with:

Scaffolding a data app
npx @microsoft/rayfin-cli init my-data-app --template dataapp

Rather than starting from an empty CRUD backend, this template connects to an existing Power BI semantic model and queries it with DAX through the Execute DAX Queries API. It ships with built-in visuals and a data grid, so the common "put a real UI on top of a model my BI team already built" scenario no longer requires you to hand-roll the query layer.

It also includes Playwright-based validation out of the box, which matters more than it sounds: it gives you a repeatable way to prove the app still works after a schema or model change.

Agent & AI Tooling

Fabric Apps now ships first-class support for AI coding agents, which is a meaningful shift in how these apps are expected to be built:

@microsoft/rayfin-mcp

An MCP server for the Rayfin SDK. Point an MCP-capable agent at it and the agent gets structured access to Rayfin's capabilities instead of guessing at the API from memory.

.agents/skills/rayfin/

Scaffolded projects include agent skill definitions plus an AGENTS.md, so a coding agent working in your repo already knows the project's conventions and commands.

This pairs naturally with the rest of the Fabric agent story — see Agentic Fabric for how MCP servers fit across the platform.

Custom Templates & Registries

You can now author your own templates and publish them to a registry, rather than being limited to Microsoft's starters. For any organisation standing up more than a handful of Fabric Apps this is the difference between every team inventing its own structure and a single golden-path template that bakes in your auth roles, naming, and CI wiring.

Microsoft also maintains microsoft/awesome-rayfin, a community gallery of example apps worth reading before you design your own.

CI/CD with GitHub Actions

There is now documented guidance for deploying Fabric Apps from GitHub Actions. This is the practical workaround for the ALM gap: because App items aren't covered by Fabric Git integration or Fabric deployment pipelines (see Limitations), your pipeline runs the Rayfin CLI against a target workspace instead of using Fabric's native promotion.

📌 A documented conflict worth knowing about

The GitHub Actions guidance depends on service principal authentication, but the CLI reference separately states that service principal login "isn't currently supported". These two Microsoft documents disagree. Validate SP login in a throwaway workspace before you commit to an automated pipeline design — and have a fallback plan if it doesn't work in your tenant.

Architecture

How Fabric Apps Work

Understand the managed service architecture — from TypeScript models to deployed app.

Deployment Flow

When you run rayfin up, Fabric creates a managed app service with child items:

Child ServiceWhat It ProvidesPortal Capabilities
SQL Database in FabricManaged SQL database with schema from TypeScript decoratorsView database, run queries, copy connection string (read-only in portal — schema changes via code)
AuthenticationFabric-brokered auth using Microsoft Entra ID (SSO)View authenticated users in the SQL database
Static ContentFrontend assets (HTML, CSS, JS) served at a public URL via OneLake storageView hosting URL; assets updated on each deploy

App Backend URL

Each Fabric app gets a single endpoint exposing all services:

Endpoint Structure
https://<your-app>-app.rayfin.windows.net/

/api/graphql  → Data API (GraphQL) — queries & mutations via RayfinClient
/auth         → Authentication service
/storage      → File storage

What Fabric Manages For You

SDK

Rayfin SDK & CLI

The open-source toolkit for defining, developing, and deploying Fabric Apps.

What Is Rayfin?

Rayfin is an open-source Backend-as-a-Service (BaaS) SDK and CLI for Microsoft Fabric — think Supabase or Firebase, but with enterprise governance, Entra ID auth, and OneLake integration baked in.

📦 Key Capabilities

  • TypeScript-first data model decorators
  • Auto-generated GraphQL APIs
  • Type-safe client SDK (RayfinClient)
  • Row-level security via @role policies
  • Local dev with Docker (full stack)
  • One-command deployment to Fabric

🛠️ CLI Commands

CommandPurpose
npm create @microsoft/rayfin@latestScaffold a new project
npx rayfin upDeploy to Fabric
npx rayfin up db applyApply schema changes
npm run devLocal frontend development mode

Getting Started

Create and Deploy a Fabric App
# Scaffold a new Rayfin project
npm create @microsoft/rayfin@latest my-app --workspace my-fabric-workspace

# Navigate to the project
cd my-app

# Develop locally (Docker required)
npm run dev

# Deploy to Fabric (provisions DB, auth, APIs, and static hosting)
npx rayfin up

Data Model Decorators

Define your app's data schema with TypeScript decorators. Fabric generates the database tables, GraphQL endpoints, and authorization rules automatically:

rayfin/data/models.ts — Example Data Model
import {
  entity, role, text, boolean, date, uuid
} from '@microsoft/rayfin-core';

@entity()
@role('authenticated', '*', {
  policy: (claims, item) => claims.sub.eq(item.user_id),
})
export class Todo {
  @uuid() id!: string;
  @text({ min: 1, max: 100 }) title!: string;
  @boolean() isCompleted!: boolean;
  @date() createdAt!: Date;
  @date({ optional: true }) dueDate?: Date;
  @text() user_id!: string;
}
💡 What Gets Generated

From decorators, Fabric Apps automatically creates: database table definitions, GraphQL API endpoints (queries + mutations), row-level authorization rules, and type-safe client methods for your frontend.

Frontend

Building the Frontend

Create custom HTML/JS applications — from simple dashboards to full interactive tools.

Supported Frontend Approaches

ApproachUse CaseNotes
Plain HTML/CSS/JSSimple dashboards, quick prototypesNo build step needed — just static files
React / ViteInteractive SPAs, complex UIsBuild output deployed as static assets
Next.js (static export)Content-rich apps with routingUse output: 'export' for static generation
D3.js / VegaCustom data visualizationsIdeal for analytics dashboards beyond Power BI

Connecting Frontend to Backend

Use the type-safe RayfinClient to query your GraphQL APIs from the frontend:

Frontend — Querying Data
import { RayfinClient } from '@microsoft/rayfin-client';

const client = new RayfinClient({
  endpoint: 'https://my-app-app.rayfin.windows.net'
});

// Fluent, type-safe query — catches errors at compile time
const page = await client.todo
  .select('id', 'title', 'isCompleted')
  .where({ isCompleted: false })
  .orderBy('createdAt', 'DESC')
  .first(25)
  .executePaginated();

const todos = page.items;

// Single record by primary key
const one = await client.todo.findByPk(id);

// Mutations
await client.todo.create({ title: 'Write docs', isCompleted: false });
await client.todo.update(id, { isCompleted: true });
await client.todo.delete(id);

Project Structure

Typical Fabric App Project
my-app/
├── rayfin/
│   ├── data/
│   │   └── models.ts        # Data models with decorators
│   └── rayfin.yml            # App configuration
├── app/                      # Your frontend (HTML, React, etc.)
│   ├── index.html
│   ├── styles.css
│   └── main.ts
├── package.json
└── tsconfig.json
Security

Security & Permissions

Authentication, authorization, and what you're responsible for.

Authentication Model

Authorization — Row-Level Security

Use the @role decorator to define fine-grained access policies directly in your data models:

Row-Level Security Example
@entity()
@role('authenticated', '*', {
  // Users can only access their own records
  policy: (claims, item) => claims.sub.eq(item.user_id),
})
@role('admin', '*')  // Admins can access everything
export class Document {
  @uuid() id!: string;
  @text() title!: string;
  @text() user_id!: string;
}

Item Permissions in Fabric Portal

PermissionWhat It Allows
Run and interact (default)Open and use the deployed application. All workspace members get this by default.
Edit (Write)Deploy code with rayfin up, apply schema changes, update settings.
ReshareGrant other users access to the app. Requires admin role on workspace.

Your Security Responsibilities

⚠️ You Are Responsible For
  • Keeping secrets, API keys, and sensitive data out of frontend code (static content is served from a public URL)
  • Defining appropriate @role policies — auth controls sign-in, but your code controls what users see and do
  • Granting only necessary permissions to contributors
  • Legal and compliance accountability for collected data
Scenarios

When to Use Fabric Apps

Ideal scenarios and when to choose alternatives.

✅ Ideal Scenarios

🚀 Rapid Prototyping

Go from idea to live URL in minutes with preconfigured infrastructure. AI agents (GitHub Copilot) can generate and modify backends directly.

🛠️ Internal Tools & Dashboards

Build authenticated admin interfaces, approval workflows, and operational tools without backend boilerplate.

📈 Custom Data Visualizations

When Power BI reports aren't enough — build interactive D3.js/Vega dashboards querying Fabric data via GraphQL.

🤖 AI Agent Applications

Provide structured backend services for AI agents that need persistent state, user context, and governed data access.

⚠️ When to Choose Alternatives

RequirementBetter Alternative
Complex multi-step transactions or stored proceduresSQL Database in Fabric / Warehouse
Custom auth providers (OAuth, SAML beyond Entra ID)Azure App Service + custom backend
High-traffic public-facing consumer appsAzure Static Web Apps / Azure Container Apps
Content distribution to business users (reports)Power BI Apps (workspace apps)
Practices

Best Practices

Patterns for production-ready Fabric Apps.

Development Workflow

⚠️ Fabric Apps are not covered by Fabric's built-in ALM features.

App items are not supported by Fabric Git integration or Fabric deployment pipelines — the two named platform features you'd normally use to sync a workspace to a repo and promote items through Dev → Test → Prod. So don't plan to promote an App the way you promote a semantic model or notebook.

This does not mean you have no CI/CD. It means you own it rather than the platform providing it: your source of truth is your own external Git repo, and promotion happens by running the Rayfin CLI — manually or from GitHub Actions — against a different workspace. Budget for building that yourself.

Security Best Practices

Performance & Cost

Integration with Fabric Ecosystem

Limits

Limitations & Constraints

Know these before you commit an application to Fabric Apps.

Fabric Apps is a Preview product, and its constraints are real enough to disqualify certain designs outright. Read this list as a go/no-go gate, not as a backlog of things that will be fixed by the time you ship.

Data Modelling

ConstraintWhat it means for your design
No many-to-many relationshipsModel the join explicitly as its own entity. If your domain is inherently M:N-heavy, expect friction
No composite primary keysEvery model needs a single-column PK. Natural composite keys must become a surrogate key plus a uniqueness constraint you enforce yourself
No count() on the fluent clientYou cannot ask the typed client for a row count. Pagination UIs that show "page 3 of 47" need a different approach
Columns cannot be renamed, retyped, or removed remotelySchema evolution is additive in practice. Destructive changes require intervention outside the normal rayfin up flow — get your column names and types right early

Platform & Operations

ConstraintWhat it means for your design
Not covered by Fabric Git integration or deployment pipelinesThese two named Fabric ALM features don't support App items. CI/CD is still possible — you drive it externally with the Rayfin CLI or GitHub Actions
No custom authentication providersEntra ID only. If you need B2C, a third-party IdP, or your own token issuer, Fabric Apps is the wrong host
No built-in multi-environment supportDev/Test/Prod is a convention you implement with separate workspaces and rayfin up switch
Static content ZIP limited to 100 MBGenerous for a normal SPA, but rules out shipping large media or WASM bundles with the app. Serve heavy assets from elsewhere
Regional availabilityNot all Fabric regions are supported — UK South and UK West are notable exclusions. Confirm your capacity's home region before planning
Preview, with no published GA datePreview terms mean no production SLA and the possibility of breaking changes. Do not put a regulated or revenue-critical workload here yet
📌 Where Microsoft's own docs disagree

While researching this page we found several unresolved contradictions in the official documentation. They're worth knowing so you don't lose a day to them:

  • Service principal login is described as unsupported in the CLI reference, yet the GitHub Actions CI/CD guidance requires it
  • npm run dev is described in one place as running against a local Docker backend and in another as running against the remote Fabric backend
  • Local development authentication is listed inconsistently between the FAQ and the authentication documentation

In each case, test the behaviour in your own tenant rather than trusting either document.

Setup

Prerequisites & Getting Started

What you need before building your first Fabric App.

Prerequisites

RequirementDetails
Fabric CapacityWorkspace must have Fabric capacity assigned. Microsoft publishes no minimum SKU for Fabric Apps — don't assume an F-floor
Tenant SettingAdmin must enable "Fabric Apps (preview)" in Tenant settings → Fabric Apps
Node.jsNo version floor is formally documented; Microsoft's GitHub Actions sample pins Node 20
DockerRequired for local development (npm run dev)
Supported RegionCheck region availability — not all regions supported yet

Enable Fabric Apps (Admin)

  1. Sign in to the Fabric admin portal
  2. Navigate to Tenant settings
  3. Under Fabric Apps (preview), toggle to Enabled
  4. Choose to enable for the entire organization or specific security groups
  5. Select Apply (changes may take a few minutes to propagate)

Your First App in 3 Commands

Quick Start
# 1. Scaffold a new project (interactive wizard)
npm create @microsoft/rayfin@latest my-app --workspace my-fabric-workspace

# 2. Navigate and explore the generated project
cd my-app

# 3. Deploy to Fabric — provisions everything
npx rayfin up
💡 Replit Partnership

Rayfin has a partnership with Replit — you can prototype your frontend in Replit and deploy to Fabric for enterprise-grade production. Great for rapid iteration with AI coding assistants.

Resources

Resources

Official documentation, SDK, and community resources.