← awmium/blog
blog/fabric-app-editor-to-workspace.mdread-only
---
date: 2026-11-08
read: 11 min
---

From editor to workspace

Code locally against real Fabric, ship with one command

Once a team has a Fabric app under way, the questions I get change. While they build it, where is it running, and whose sign-in and data is it using? What does the one deploy command actually change, and what stops it from landing on the wrong app or dropping a table? And how do dev, test and production work when Fabric has no pipeline for apps yet?

This post answers those for the developers who run the loop and the people who govern it. Commands appear only where they help, and it ends with the release checklist I use.

One project, three workspaces: a dry run names the dev workspace, a deploy updates dev, a switch makes test the active target and the same command updates test, while production waits for its release owner.
One project, three workspaces: a dry run names the dev workspace, a deploy updates dev, a switch makes test the active target and the same command updates test, while production waits for its release owner.

The website runs on your machine, the backend in Fabric

In the normal loop there is no local copy of the backend. The website runs on the developer’s machine, and everything behind it (the database, sign-in, the data API) is the app’s real item in a Fabric workspace. Microsoft also offers a Docker backend on your own machine, but it is still a preview.

Say that out loud to whoever governs the workspace, because local development works against real Fabric. The development command in Microsoft’s starter templates creates the app’s item if it is missing, then applies the current tables and settings to it. The data app template has you start the local site and preview it inside the app’s existing item in Fabric. Either way, the item behind the local site is real: it uses capacity, and whatever the app writes lands in it. So the first rule of the loop is that it points at a dev workspace, never at production.

Sign-in depends on where the code runs

Microsoft’s own pages disagree here (more on that below). What the sign-in documentation describes comes down to three situations:

  1. A local browser tab, backend in Fabric. The app opens the Fabric portal in a pop-up, you sign in with your work account, and the portal hands the session back to your local address. It works because localhost:5173 is on the app’s list of allowed return addresses by default.
  2. Your local code inside the portal. Open the app item in Fabric with a small addition to its address, and the portal frames your local server and signs you in exactly as it will sign in your users.
  3. Deployed. Fabric sign-in only, with the work account people already have.
Three places the code can run: a local tab signs in through a Fabric pop-up, local code framed by the portal uses the portal’s own sign-in, and a deployed app uses Fabric sign-in only.
Three places the code can run: a local tab signs in through a Fabric pop-up, local code framed by the portal uses the portal’s own sign-in, and a deployed app uses Fabric sign-in only.

The toolkit also has email and password sign-in. It is for local development only and never works once an app is deployed, so with the backend in Fabric the team signs in with the accounts it already has.

note The docs disagree on local sign-in

Microsoft’s authentication overview says Fabric sign-in only works when the app is opened from Fabric, so it can’t be used in local development. The Fabric Apps FAQ lists Entra sign-in for local development, and the sign-in pages describe a pop-up flow whose default return address is localhost. This post follows the FAQ.

Check it where your users will see it

The habit I rely on most is the one the data app template’s README documents: run npm run dev, open the app item in the Fabric portal, and add &devUri=http://localhost:5173 to the end of its address. The portal loads your local server inside the real item, with real sign-in, and the page updates as you save. It is in the README of release 4.2.0, the release a new project gets today, rather than on Learn. The item has to exist first, so the first deploy comes before the first preview.

The portal preview: add devUri to the app item’s address and the real item frames your local code, signed in as you; a saved edit shows up in place.
The portal preview: add devUri to the app item’s address and the real item frames your local code, signed in as you; a saved edit shows up in place.

How the app reaches the model depends on the release your project has. Release 4.2.0 uses the template’s own data client: model connections live in a fabric.yaml file, and the developer’s data tools sign in through the Azure CLI (az login is a README prerequisite). From 4.3.0 the template moves to the Rayfin semantic model connector, which is what Learn’s page for the template already describes, but a default scaffold does not get it yet.

Learn and today’s template also disagree on checking. Learn still tells you to use a Playwright browser check; release 4.2.0 replaced it with a check that runs each chart’s real query and renders the chart without a browser, and dropped the script that opened the app in the portal. So check which release your project has before you decide how to test it.

What the deploy command touches

When the work is ready, one command ships it. rayfin up creates the item if it is missing (or reuses it), syncs the settings, applies the database changes, builds and uploads the website, and records where it went. A first deploy typically takes two to five minutes; a website-only deploy, 30 to 60 seconds.

bash
npx rayfin up --dry-run
npx rayfin up
npx rayfin up status

Preview, deploy, confirm. The rest of the family is for narrower jobs.

What each deploy command changes: the full deploy touches settings, database and website; the dry run, status, list and switch change nothing; the database and website commands touch one part each.
What each deploy command changes: the full deploy touches settings, database and website; the dry run, status, list and switch change nothing; the database and website commands touch one part each.
  • The dry run checks your inputs and names the workspace it would deploy to, without building or changing anything. It still signs you in, and a clean preview is no promise the deploy will succeed.
  • Database only and website only exist for speed. The website-only deploy does not apply a change to the hosting access setting (protected or public); that needs a full deploy.
  • Status confirms the item answers with your sign-in, not that every page works; open the app from Fabric for that.

Two guards deserve a line in your release notes:

  1. Data-losing schema changes are refused. If a change would drop or rename a table, remove a column or change its type, the CLI stops and lists what it would do; --force overrides it. Microsoft’s advice is to keep --force for when the CLI recommends it and never use it routinely against production. I treat it as a production data change, so someone other than the developer reads the list first.
  2. The website has a size limit. It is zipped and must stay under 100 MB compressed. Trim source maps and large media first; big files belong in the app’s file storage.

A small file decides where a deploy lands

How does rayfin up know which app to update? The CLI keeps a record in the project folder, rayfin/.deployments.json, listing every workspace the project has deployed to, the item in each, and which entry is active. The next deploy updates whatever item the active entry names. Some Learn pages still describe the older files this record replaced in CLI 1.17.

How a deploy picks its target: the active entry in the project’s record names one item; a copied folder carries the record and deploys over the original, while a fresh clone has no record at all.
How a deploy picks its target: the active entry in the project’s record names one item; a copied folder carries the record and deploys over the original, while a fresh clone has no record at all.

Git ignores the record, rightly: it is a local pointer, not part of the app. It also explains the costliest mistake I see. Copy an app’s folder to start a new one and the copy carries the record, so its first deploy lands on the original’s item; from then on, whichever folder deploys last wins. A fresh clone has no record. Its first deploy uses the project’s id from rayfin.yml as the item name, and if an item with that name is already in the workspace, the CLI asks before reusing it (--yes approves that without asking).

When I fork an app, I do four things before its first deploy:

  1. Delete rayfin/.deployments.json in the copy.
  2. Give the copy its own id and name in rayfin.yml, or pass its own item name to the deploy.
  3. Clear the copied hosting addresses from the sign-in allow list in rayfin.yml. Every deploy adds its address there, and Microsoft warns that a stale one can become an unintended redirect target for sign-in.
  4. Run a dry run with the workspace named explicitly, read what it says, then deploy without --yes.

Dev, test and production are separate workspaces

Fabric apps are not on the supported lists for Fabric’s Git integration or its deployment pipelines, and the Fabric Apps FAQ says lifecycle management is not supported yet. The CLI’s guide already describes deployment pipelines for apps, so this may change. Today, each stage is its own deploy from the same code.

Microsoft’s pattern is one workspace per stage. The first deploy to each names the workspace (--workspace) and adds an entry to the record; rayfin up switch changes the active entry, so a plain rayfin up goes to that stage, and rayfin up list shows them all. One Learn page writes the switch as rayfin switch, but the CLI only has rayfin up switch.

Three things about stages catch teams out:

  1. Each stage is a separate app. Its own item and address, and if it keeps data, its own database and list of signed-in users. Test data does not follow a release into production.
  2. Where it deploys and what it reads are separate settings. An app over a semantic model names its model in its own configuration, so deploying to production does not repoint it at the production model. Decide which model or database each stage reads, and check it in every release.
  3. A build belongs to one stage. Unless the app looks its addresses up when it loads, which the CLI’s guide describes, the backend’s address is written into the website when it is built. Let each deploy build for its own stage; reusing a build after a switch (the website-only deploy’s skip-build option) would ship one stage’s addresses to another.

This is the split I suggest for who holds what:

devtestproduction
who deploysthe developersthe release ownerthe release owner, nobody else
who opens itthe teamtesters, with Run and interactusers, with Run and interact
--forceallowed, after reading the listwith sign-offonly as a planned data change
readsdev or sample datadata close to productionthe production model or database

Deploying needs Edit on the item, and creating one needs Contributor, Member or Admin on the workspace. So the release list for production is everyone with Edit on its item, through a workspace role or directly: keep it short, and give everyone else Run and interact. For the admins: every deploy runs as a named person. The CLI lists a service-principal sign-in, but Microsoft’s CLI reference says it is not supported yet, which is another reason to name the release owner.

The repository is the app

Everything that makes the app lives in its code: the tables and their access rules, the website, the settings file. The workspace holds the built result, and the record holds a pointer. Because Git integration does not cover apps, there is no copy of the source in Fabric to go back to. Microsoft’s FAQ answer for rolling back is to check out the previous commit and deploy it again, which only works if every release was committed before it went out.

The item has an owner like any Fabric item, and for apps with functions that matters more than usual: functions reach outside services with the owner’s permissions, not the viewer’s. Fabric also warns that items whose owner has left can stop working correctly. So when the person who built an app moves on, this is my handover list:

  1. The repository, with every release committed and tagged, and access for the new owner.
  2. Edit on each stage’s item for the new owner, and the previous owner’s access reviewed.
  3. Ownership of the item. Fabric has a Take over action in an item’s settings for when an owner leaves or has not signed in for 90 days. It is documented for Fabric items in general, so check it is offered on the App item before you count on it.
  4. A fresh record. The new owner’s clone has none, so their first deploy names the workspace and item, starts with a dry run, and confirms it reuses the existing item.

What to take away

  • The website runs on your machine against the app’s real item in Fabric, so point local work at dev.
  • Sign-in follows where the code runs; on the data app template, check screens inside the portal, and know which release your project has.
  • rayfin up ships settings, database and website together; data-losing schema changes need --force, and the website stays under 100 MB compressed.
  • A record in the project folder, ignored by Git, decides which item a deploy updates, and a folder copy carries it.
  • Each stage is a separate app in its own workspace, and the repository is the only complete copy of the app.

Before every release to production, I go through these eight questions with whoever is running it:

  1. Is the code committed and tagged, so this release can be rebuilt and rolled back?
  2. Was every changed screen checked while signed in through Fabric, and once in test by someone who has only Run and interact?
  3. Does rayfin up list show production as the active entry, and does the dry run name the workspace you expect?
  4. Does the change drop, rename or retype anything? If the CLI asks for --force, who read the list and agreed?
  5. Does this stage read the right model or database?
  6. Is the website under 100 MB compressed, with no source maps or stray media in it?
  7. Is the person running the deploy the named release owner, with Edit on this item?
  8. Afterwards: does status answer, does the app open from Fabric for an ordinary user, and does the sign-in allow list hold only addresses you recognise?

Next in this series, FA-B-05, An agent builds it: what this loop looks like when a coding agent does the typing.

note Checked against the docs

Fabric Apps is in preview, so details move. Everything here was checked on 23 October 2026 against Microsoft’s Fabric Apps documentation, the CLI’s own help and guide (version 1.36.2) and the data app template’s release 4.2.0. Where the docs disagree with each other, the post says so. Where the docs and this post disagree later, the docs win.

read# From editor to workspace[ ] sections2,539 words · 11 minTop