⚡ Public Preview · Build 2026

Microsoft Rayfin & Fabric Apps: Complete Developer Guide

Announced at Microsoft Build 2026, Microsoft Rayfin is an open-source SDK and CLI that deploys a complete governed application backend to Microsoft Fabric in one command. This guide covers the architecture, TypeScript data models, GraphQL API, CLI reference, and real enterprise use cases.

Quick Answer — What Is Rayfin?

Microsoft Rayfin is an open-source SDK and CLI that lets developers and AI coding agents define a complete application backend in TypeScript and deploy it to Microsoft Fabric in one command: npx rayfin up. The backend includes a SQL database, Microsoft Entra ID authentication, a schema-driven GraphQL API, and OneLake-connected static hosting. App data lands in OneLake automatically — no ETL pipeline required. Currently in public preview since Build 2026 (June 2, 2026).

📅 Last verified: June 2026 ⏱ ~14 min read ✍️ , UIG Data Lab 🔗 Source: Microsoft Learn
▶ Microsoft Build 2026 — Rayfin official announcement and live demo

Why Microsoft Built Rayfin

AI coding agents have made it trivial to build a working application frontend in under an hour. The backend required to run that application in enterprise production is still a multi-week ordeal — auth configuration, database setup, access policies, compliance wiring, and governance controls that almost always get bolted on too late.

This is the gap Microsoft is closing with Fabric Apps and the Rayfin SDK. The bottleneck in 2026 is not model capability — it is consistent, shared data context. Every new agent or app starts from zero, relearning where data lives and what rules to follow. Without a consistent foundation, agents can’t coordinate and apps create silos.

🧱

The Backend Wall

Teams write frontend logic in minutes but spend weeks configuring identity management, OAuth flows, and database provisioning. Every project reinvents the same plumbing.

🔗

Pipeline Fragility

Moving operational app data into analytics systems required brittle ETL orchestration. Reporting systems experienced hours of synchronization delays from live transactional data.

⚠️

Governance Added Too Late

Security, compliance, and access policies were retrofitted after build — not designed in. This is the enterprise replatforming problem: apps that can’t reach production safely.

🤖

Agent Data Silos

Every AI agent and app was creating its own isolated database outside the governed data estate. Context couldn’t be shared. Agents couldn’t coordinate.

Field note — A.J., UIG Data Lab

I’ve seen this pattern across multiple enterprise migrations. Teams spend 80% of their effort on infrastructure that isn’t the application — auth, networking, database schemas, governance wiring. By the time the app logic gets attention, the architecture is already compromised. Rayfin is the first serious attempt I’ve seen from Microsoft to collapse this setup cost to near-zero for Fabric-native workloads.

What Is Microsoft Rayfin?

Rayfin is an open-source SDK and CLI that turns backend development into a code-first, declaration-driven workflow. Developers — or AI coding agents working on their behalf — describe the application backend in TypeScript. Rayfin generates the infrastructure and deploys it directly to Microsoft Fabric.

Microsoft Rayfin application running in a Microsoft Fabric workspace showing the managed backend services Rayfin deployed application running as a managed service inside a Microsoft Fabric workspace — Source: Microsoft

Once deployed, the application runs as a first-class Fabric artifact — visible in the Fabric portal, connected to OneLake, and governed by the same security and compliance controls already enforced across the tenant. Application data lands in OneLake automatically. No copy. No ETL pipeline. No synchronization delay.

ℹ️
Official Definition — Microsoft Learn

Fabric Apps helps you build data-driven applications on Microsoft Fabric by combining data models, generated APIs, authentication, and hosting in one development workflow. You define your data models in TypeScript, and Fabric Apps uses them to generate the backend pieces your app needs.

The Replit partnership is the commercial headline: Replit is the exclusive launch partner. Developers build in Replit’s AI coding environment, deploy with Rayfin, and the entire application — code, data, and services — stays managed inside the organisation’s own Fabric tenant.

Rayfin unlocks a new development model for our users. Agents write the code. Fabric ships it quickly and safely. Together, we’re giving developers something they’ve never had before: a path from idea to enterprise-grade production that’s measured in hours, not months.
Amjad Masad — CEO, Replit

Fabric Apps Architecture

A Fabric App deployed to a workspace provisions three managed child services. These are not separate resources you configure — Fabric creates and manages them automatically based on your rayfin.yml configuration.

Child ServiceWhat It ProvidesPortal Capabilities
SQL Database in FabricManaged SQL database. Schema is generated automatically from TypeScript data model decorators via rayfin up.View database, run read queries, copy connection string. Schema changes must come from code — the portal database is read-only.
Authentication ServiceBrokered authentication using Microsoft Entra ID SSO exclusively. Users sign in through their existing Fabric identity.View authenticated users in the SQL database. No other auth providers are available after deployment.
Static Content HostingBuilt frontend assets (HTML, CSS, JS) served at a public URL backed by OneLake storage. Updated atomically on each deploy.View hosting URL. Assets refresh on every rayfin up deployment.

App Backend Endpoint Structure

Each Fabric App gets a single base endpoint. All services are exposed through path-based routing:

Endpoint PathService Purpose
/api/graphqlData API — used by RayfinClient for all read and write operations via GraphQL
/authAuthentication service — Microsoft Entra ID SSO flows
/storageFile storage — backed by OneLake
Microsoft Fabric Apps architecture diagram showing Database, Auth, and Hosting as the three managed backend services Fabric Apps architecture: Backend-as-a-service (Database + Auth) plus Static Content hosting — Source: Microsoft
Base endpoint format
https://-app.rayfin.windows.net/

TypeScript Data Models & GraphQL

This is where Rayfin’s developer experience stands apart. You define your data model once in TypeScript using decorators. Rayfin generates the SQL schema, the GraphQL API, and the type-safe client — all automatically. No separate ORM configuration. No hand-written schema migrations.

TypeScript data model — rayfin/data/Todo.ts
// From Microsoft Learn official documentation
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()  title!: string;
  @boolean() completed!: boolean;
  @date()  createdAt!: Date;
  @uuid()  user_id!: string;
}

From this TypeScript class, Rayfin automatically generates: a SQL table with the correct column types, a GraphQL endpoint with full CRUD operations, a row-level security policy based on the @role decorator, and a type-safe client SDK with autocomplete.

Querying data with RayfinClient
import { RayfinClient } from '@microsoft/rayfin-client';
import type { Todo } from '../rayfin/data/Todo';

const client = new RayfinClient<{ Todo: Todo }>({
  baseUrl: import.meta.env.VITE_RAYFIN_API_URL,
  publishableKey: 'pk-your-project-key',
});

// Type-safe query — autocomplete on all fields
const todos = await client.data.Todo
  .select(['id', 'title', 'completed', 'createdAt'])
  .execute();

// Find by primary key
const todo = await client.data.Todo
  .findByPk('00000000-0000-0000-0000-000000000000');
What Gets Generated Automatically
  • SQL database schema from TypeScript class decorators
  • GraphQL API endpoint at /api/graphql with full CRUD
  • Row-level security policies from @role decorators
  • Type-safe client SDK with TypeScript autocomplete
  • Client-side query validation before requests reach the backend
Field note — A.J., UIG Data Lab

The decorator-driven schema approach is genuinely clever. The @role decorator with a policy lambda compiles down to row-level security on the SQL database — your access control logic lives in the same file as your data model. For teams used to managing RLS separately in the database layer, this is a meaningful shift. The risk is that schema changes in the SQL database directly break the app — always migrate through rayfin up db apply, never touch the portal database directly.

CLI Reference & Deployment Workflow

The Rayfin CLI handles the complete development lifecycle from scaffolding to production deployment. Install it once and the three core commands cover the majority of your workflow.

Install the CLI
npm i @microsoft/rayfin-cli
  • Scaffold a new project Creates a new project from a template — includes a React frontend, TypeScript data models, and rayfin.yml configuration. Choose from Blank App, To-Do App, or Data App templates.
  • Run locally with Docker The full stack runs locally — frontend dev server, local database, and auth emulation. Rapid iteration before committing to a Fabric deployment.
  • Deploy to Microsoft Fabric One command compiles frontend assets, evaluates schema changes, and provisions or updates all managed child services in the Fabric workspace.
Core CLI commands — from Microsoft Learn CLI Reference
# 1. Create a new project from template
npm create @microsoft/rayfin@latest my-app \
  --workspace 

# 2. Run frontend dev server locally
cd my-app
npm run dev

# 3. Deploy full application to Microsoft Fabric
npx rayfin up

# Apply TypeScript schema changes to Fabric SQL database
npx rayfin up db apply

# For existing projects (add Rayfin to existing codebase)
npx rayfin init my-app \
  --services db,storage \
  --auth-methods fabric \
  --static-hosting

# Check deployment status
npx rayfin status
🚨
Critical: Never Modify the SQL Database Directly

The SQL Database in Fabric is read-only in the portal. All schema changes must originate from TypeScript data model decorators deployed via rayfin up db apply. Making schema changes directly in the SQL database creates conflicts that break the app. If you hit this, the only clean resolution is reverting the manual change and re-running the CLI deployment.

▶ Rayfin technical walkthrough — data models, GraphQL, authentication & OneLake integration

Rayfin vs Supabase, Neon, Power Apps & Azure App Service

Microsoft explicitly positions Rayfin against Supabase and Neon — the Postgres-compatible backends that AI coding tools default to. Understanding the real trade-offs matters before committing your architecture.

Rayfin vs Supabase & Neon

FactorRayfin on FabricSupabase / Neon
Data governanceNative — inherits Fabric tenant controlsManual — isolated database outside data estate
Analytics integrationZero-ETL — lands in OneLake automaticallyRequires ETL — separate pipeline to analytics
AI/agent context sharingUnified — shared Fabric IQ context layerSiloed — each app creates isolated data
Cloud portabilityAzure only — requires Fabric F-SKUMulti-cloud — Postgres is portable
MaturityPreview — Build 2026 announcementGA — production-ready

Rayfin vs Power Apps

FactorFabric Apps (Rayfin)Power Apps
Target audienceSoftware engineers, professional developersCitizen developers, business analysts
Development modelCode-first: TypeScript, React, CLILow-code: drag-and-drop, Power Fx
Data layerFabric SQL + OneLake (auto-generated)Dataverse or external connectors
Best forComplex data-intensive enterprise appsSimple internal forms and workflows
Field note — A.J., UIG Data Lab

The honest assessment: if your organisation is already deep in Microsoft Fabric, Rayfin removes weeks of backend setup and keeps every AI-built app inside your governance boundary by default. If you’re not on Fabric — or need global edge distribution, multi-cloud portability, or battle-tested production SLAs — Supabase or Azure App Service remain the better choices right now. Rayfin is not yet a general-purpose backend platform. It’s a governed Fabric-native backend platform. The distinction matters.

Real Enterprise Use Cases

We appreciate how quickly we can build and iterate in Replit, but for some of our business, our data needs to stay governed and centralized in Fabric. With Rayfin, we finally have both: fast development in the tools we prefer, and the confidence that our applications run on top of our enterprise data platform.
Cody Luth — AI Solutions Architect, Leatherman

Supply Chain & Field Operations

Field workers log delivery or inspection status through a React frontend. Writes go directly to the Fabric SQL database via GraphQL mutations. That data is immediately queryable by Power BI semantic models and AI agents without any ETL delay — on-time delivery metrics update in real time rather than with a multi-hour lag from a nightly pipeline.

Agentic AI Apps with Shared Business Context

AI coding agents building Rayfin applications draw from the organisation’s existing Fabric IQ context layer — the unified business ontology covering data, semantics, and real-time signals. (We break down this workflow in our Agentic Data Engineering Tutorial). App data generated by those agents feeds back into the same context layer, enriching it for subsequent agents. This bidirectional flow is what prevents the data silo problem that affects every other agentic backend approach.

Custom Executive & Operational Dashboards

When standard Power BI layout constraints prevent exact KPI presentations, Fabric Data Apps allow developers to build pixel-perfect React dashboards that execute DAX queries directly against trusted semantic models. (See the new PBIR enhanced report format capabilities for more on this shift). Visualization as Code — storing DAX and React TSX files in Git — gives these dashboards the same version control and deployment rigour as the rest of the application.

Licensing, Pricing & Capacity Requirements

Rayfin does not have its own pricing tier. Fabric Apps consume Capacity Units (CUs) from your organisation’s existing F-SKU capacity. This means the cost is additive to whatever you’re already spending on Fabric compute.

F-SKU Required

Fabric Apps require an active Fabric capacity assigned to the workspace. Power BI Pro shared capacity and entry-tier workspaces are not supported. Minimum recommended: F4 for development, F32+ for production workloads.

🔧

Tenant Admin Enablement

A Fabric tenant administrator must enable the Fabric Apps workload in the Admin Portal under Tenant settings before any user can create Fabric App items. This is a one-time org-level setup.

📊

CU Consumption

Every database transaction, authentication request, GraphQL query, and static asset delivery burns background CUs. Read our Fabric capacity optimization guide to ensure your unoptimised app queries don’t spike your billing tier.

💰

No Per-User Licensing

Users with Run and interact permission can use a deployed Fabric App without needing a Power BI Pro licence — as long as the workspace is on F64 or larger capacity. Below F64, Pro licences are still required.

Frequently Asked Questions

Microsoft Rayfin is an open-source SDK and CLI announced at Build 2026 that lets developers and AI coding agents define and deploy a complete application backend entirely in TypeScript code. It provisions a SQL database, Microsoft Entra ID authentication, GraphQL API, and OneLake-connected static hosting — all deployed to Microsoft Fabric in one command: npx rayfin up.
No. Rayfin and Fabric Apps were announced as public preview at Microsoft Build 2026 on June 2, 2026. CLI commands, TypeScript decorators, and features are subject to change before General Availability. Do not build mission-critical production workloads on it until GA is announced.
Rayfin’s core differentiator is governance. Unlike Supabase or Neon — which create isolated Postgres database silos outside your data estate — Rayfin deploys directly to Microsoft Fabric, routing all application data into OneLake automatically. This means app data is immediately queryable by Power BI, notebooks, and AI agents without any ETL pipeline. The trade-off is that Rayfin requires Microsoft Fabric, which means Azure infrastructure.
You need an active Microsoft Fabric capacity (F-SKU) assigned to your workspace. Fabric Apps do not run on Power BI Pro shared capacity. A Fabric tenant administrator must also enable the Fabric Apps workload in Tenant settings in the Admin Portal before users can create Fabric App items.
The three core commands are: (1) npm create @microsoft/rayfin@latest my-app — scaffolds a new project from a template. (2) npx rayfin up — deploys the full application backend to Microsoft Fabric. (3) npx rayfin up db apply — applies TypeScript schema changes to the Fabric SQL database. Install the CLI with: npm i @microsoft/rayfin-cli.
Yes. Rayfin includes static hosting that serves compiled frontend Single Page Application files — React, or any framework that builds to static assets. The frontend is deployed alongside the backend with a single npx rayfin up command. Assets are served from OneLake storage at a public URL in the format https://your-app.rayfin.windows.net/.
No. They target completely different audiences. Fabric Apps and Rayfin are code-first (TypeScript, React, CLI) and designed for professional software engineers. Power Apps is low-code (drag-and-drop, Power Fx) designed for citizen developers and business analysts. For simple internal forms, Power Apps remains the right choice. Fabric Apps is for developers building data-intensive enterprise applications.
⚠️ Preview Status Disclaimer

Rayfin and Microsoft Fabric Apps are in public preview as of June 2026. All CLI commands, TypeScript decorator syntax, API endpoints, and feature availability are subject to change before General Availability. Information in this article is sourced from Microsoft Learn — Fabric Apps overview and the Build 2026 Azure blog post. Always verify current documentation at learn.microsoft.com before implementing. UIG Data Lab is an independent publication and is not affiliated with or endorsed by Microsoft Corporation.

A.J. Data Engineering Researcher & Technical Writer · UIG Data Lab All articles →
A.J. researches and writes about data engineering, analytics architecture, Microsoft Fabric, and modern cloud data platforms. Coverage spans Microsoft Fabric, Power BI, Azure Data Engineering, Databricks, Snowflake, Apache Spark, dbt, Apache Airflow, and modern cloud data infrastructure. The focus is practitioner-level content that helps data professionals understand platform capabilities, evaluate technology decisions, optimize costs, and implement practical solutions using official documentation, product updates, community insights, and industry best practices. His writing covers real decisions from real deployments — not documentation rewrites.
Microsoft Fabric Real-Time Intelligence KQL Databricks Apache Spark dbt Azure Synapse Snowflake AWS Data Architecture

Scroll to Top