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.
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.
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.
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
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:
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.
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.
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 Service | What It Provides | Portal Capabilities |
|---|---|---|
| SQL Database in Fabric | Managed SQL database with schema from TypeScript decorators | View database, run queries, copy connection string (read-only in portal — schema changes via code) |
| Authentication | Fabric-brokered auth using Microsoft Entra ID (SSO) | View authenticated users in the SQL database |
| Static Content | Frontend assets (HTML, CSS, JS) served at a public URL via OneLake storage | View hosting URL; assets updated on each deploy |
App Backend URL
Each Fabric app gets a single endpoint exposing all services:
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
- Infrastructure: Compute, networking, scaling, and hosting
- Database: Schema creation, migrations, and query endpoints
- Security: Entra ID SSO, HTTPS, PKCE, session tokens
- APIs: GraphQL generated from your TypeScript models
- Storage: Static assets + file storage in OneLake
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
@rolepolicies - Local dev with Docker (full stack)
- One-command deployment to Fabric
🛠️ CLI Commands
| Command | Purpose |
|---|---|
npm create @microsoft/rayfin@latest | Scaffold a new project |
npx rayfin up | Deploy to Fabric |
npx rayfin up db apply | Apply schema changes |
npm run dev | Local frontend development mode |
Getting Started
# 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:
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;
}
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.
Building the Frontend
Create custom HTML/JS applications — from simple dashboards to full interactive tools.
Supported Frontend Approaches
| Approach | Use Case | Notes |
|---|---|---|
| Plain HTML/CSS/JS | Simple dashboards, quick prototypes | No build step needed — just static files |
| React / Vite | Interactive SPAs, complex UIs | Build output deployed as static assets |
| Next.js (static export) | Content-rich apps with routing | Use output: 'export' for static generation |
| D3.js / Vega | Custom data visualizations | Ideal for analytics dashboards beyond Power BI |
Connecting Frontend to Backend
Use the type-safe RayfinClient to query your GraphQL APIs from the frontend:
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
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 & Permissions
Authentication, authorization, and what you're responsible for.
Authentication Model
- Deployed apps: Microsoft Entra ID (Fabric SSO) — users sign in with their existing Fabric identity
- Local development: Email/password authentication for testing
- No external providers: Only Entra ID is supported after deployment
Authorization — Row-Level Security
Use the @role decorator to define fine-grained access policies directly in your data models:
@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
| Permission | What 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. |
| Reshare | Grant other users access to the app. Requires admin role on workspace. |
Your Security Responsibilities
- Keeping secrets, API keys, and sensitive data out of frontend code (static content is served from a public URL)
- Defining appropriate
@rolepolicies — 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
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
| Requirement | Better Alternative |
|---|---|
| Complex multi-step transactions or stored procedures | SQL Database in Fabric / Warehouse |
| Custom auth providers (OAuth, SAML beyond Entra ID) | Azure App Service + custom backend |
| High-traffic public-facing consumer apps | Azure Static Web Apps / Azure Container Apps |
| Content distribution to business users (reports) | Power BI Apps (workspace apps) |
Best Practices
Patterns for production-ready Fabric Apps.
Development Workflow
- Local-first: Use
npm run devwith Docker for rapid iteration before deploying - Schema as code: Never modify the SQL database schema directly in the portal — always use TypeScript decorators and
rayfin up - Version control: Store your
rayfin/folder and frontend in Git. Treatrayfin.ymlas your infrastructure definition - Environment separation: Use separate Fabric workspaces for Dev/Test/Prod, and switch between them with
rayfin up switch. There is no built-in multi-environment concept — you manage it yourself
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
- Least privilege: Define
@rolepolicies that restrict access to owned records by default - No secrets in frontend: Static content is public — never embed API keys or connection strings
- Audit access: Review workspace permissions and app sharing regularly
- Use workspace isolation: Separate production apps into dedicated workspaces with restricted contributor lists
Performance & Cost
- Capacity awareness: Fabric Apps consume CUs from your workspace capacity — monitor usage via the Capacity Metrics app. The SQL database bills at 1 Fabric CU = 0.383 SQL vCores, and GraphQL API usage bills at 10 CUs per hour of request and response processing. App hosting, authentication, and deployment operations themselves are not separately billed
- Efficient queries: Use GraphQL field selection to fetch only what you need — avoid over-fetching
- Cache static assets: Leverage browser caching for frontend assets; Fabric serves them from OneLake
- Minimize deployments: Batch schema changes rather than deploying per-change to reduce overhead
Integration with Fabric Ecosystem
- Analytics: The app's SQL database is OneLake-integrated. The launch blog describes app data landing in OneLake for the wider stack, but the docs stop at storage integration — validate the notebook/Spark path before designing on it
- Power BI: Build Direct Lake semantic models on top of your app's SQL database for instant reporting
- AI Agents: Use Fabric Data Agents to query and act on app data programmatically
- Governance: App items live in a workspace and inherit its permission model and sharing controls. Endorsement, lineage, and Purview coverage for App items are not documented — verify before relying on them
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
| Constraint | What it means for your design |
|---|---|
| No many-to-many relationships | Model the join explicitly as its own entity. If your domain is inherently M:N-heavy, expect friction |
| No composite primary keys | Every 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 client | You 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 remotely | Schema 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
| Constraint | What it means for your design |
|---|---|
| Not covered by Fabric Git integration or deployment pipelines | These 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 providers | Entra 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 support | Dev/Test/Prod is a convention you implement with separate workspaces and rayfin up switch |
| Static content ZIP limited to 100 MB | Generous for a normal SPA, but rules out shipping large media or WASM bundles with the app. Serve heavy assets from elsewhere |
| Regional availability | Not 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 date | Preview terms mean no production SLA and the possibility of breaking changes. Do not put a regulated or revenue-critical workload here yet |
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 devis 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.
Prerequisites & Getting Started
What you need before building your first Fabric App.
Prerequisites
| Requirement | Details |
|---|---|
| Fabric Capacity | Workspace must have Fabric capacity assigned. Microsoft publishes no minimum SKU for Fabric Apps — don't assume an F-floor |
| Tenant Setting | Admin must enable "Fabric Apps (preview)" in Tenant settings → Fabric Apps |
| Node.js | No version floor is formally documented; Microsoft's GitHub Actions sample pins Node 20 |
| Docker | Required for local development (npm run dev) |
| Supported Region | Check region availability — not all regions supported yet |
Enable Fabric Apps (Admin)
- Sign in to the Fabric admin portal
- Navigate to Tenant settings
- Under Fabric Apps (preview), toggle to Enabled
- Choose to enable for the entire organization or specific security groups
- Select Apply (changes may take a few minutes to propagate)
Your First App in 3 Commands
# 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
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
Official documentation, SDK, and community resources.