Rayfin `functions` deploy fails: CLI emits TYPESCRIPT runtime but Fabric UDF service only accepts PYTHON
@mksuni is already working on this.
Since Jul 15, 2026.
- Dominant language
- No language data
- Stars
- 610
- Forks
- 62
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 3
Description
What happened?
The Rayfin functions service (client.functions.<name>.invoke()) is the only way to run server-side logic authenticated by the existing Rayfin app session — no separate Entra app registration, no admin consent. But it can't be deployed today, because the CLI and the Fabric service disagree on the runtime.
-
@microsoft/rayfin-cli(verified through 1.33.2, latest) is TypeScript-only:rayfin functions initscaffoldssrc/function_app.ts; the deploy validator hard-requiressrc/function_app.ts; deploy metadata is derived from the TypeScript AST asruntime: 'TypeScript'(functions-metadata-generator.js). Even--functions-prebuiltstill runs the TS validator + TS metadata generator. -
On
rayfin up, the static app deploys fine, but the functions deploy is rejected by the service:400 FUNCSET_DEPLOY_FAILED UnsupportedArgument: "Runtime. Value: TYPESCRIPT is unsupported. Supported values are: PYTHON"
So the consent-free client.functions.invoke() channel has no deployable backend: the only runtime the CLI produces (TypeScript) is the only one the service refuses (Python-only).
Why it matters: in tenants that block user consent to non-"low" Entra permissions, the usual fallback — a standalone Python UDF invoked with a Power BI–audience token (UserDataFunction.Execute.All) — triggers a "Need admin approval" gate that can be unobtainable. The Rayfin functions channel would avoid this because it rides the existing Rayfin session. This is already acknowledged in microsoft/awesome-rayfin → templates/pbi-fixer/rayfin/rayfin.yml: "Rayfin (TypeScript) functions are disabled: the Fabric UDF backend does not yet accept the TYPESCRIPT runtime. The server-side logic runs in a separate standalone Python User Data Functions item instead."
Ask (any one unblocks it):
- Enable the TypeScript UDF runtime server-side so the FuncSet deploy accepts what the CLI already emits (preferred — no app-author changes). Is there a GA date or a tenant/capacity preview flag?
- Or add a Python authoring path to the Rayfin
functionsservice sorayfin/functions/can be Python and deploy into the appBackend FuncSet, keepingclient.functions.invoke()consent-free. - Or document a supported way to invoke a standalone Python UDF through the Rayfin session (publishable-key auth) instead of a Power BI–audience token, so it stays consent-free in restrictive tenants.
Steps to reproduce
- In a Rayfin app, set
services.functions.enabled: trueinrayfin/rayfin.yml. npx rayfin functions init, then addudf.func('ping', async () => 'pong')insrc/function_app.ts.npx rayfin up --workspace-id <ws> --yes.- Static content deploys; the functions deploy fails with the 400 "Supported values are: PYTHON".
Environment
- Rayfin CLI: @microsoft/rayfin-cli 1.33.2 (also repro on 1.33.1)
- Node: 22.x
- OS: Windows
- Fabric: workspace on a UDF-capable capacity
- Tenant: blocks user consent to non-"low" Entra permissions
Logs or screenshots
400 FUNCSET_DEPLOY_FAILED -> UnsupportedArgument:
"Runtime. Value: TYPESCRIPT is unsupported. Supported values are: PYTHON"
(PowerBIApiErrorResponse, exceptionCulprit 1)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.