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 init scaffolds src/function_app.ts; the deploy validator hard-requires src/function_app.ts; deploy metadata is derived from the TypeScript AST as runtime: 'TypeScript' (functions-metadata-generator.js). Even --functions-prebuilt still 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
functions service so rayfin/functions/ can be Python and deploy into the appBackend FuncSet, keeping client.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: true in rayfin/rayfin.yml.
npx rayfin functions init, then add udf.func('ping', async () => 'pong') in src/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)
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: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 Rayfinfunctionschannel would avoid this because it rides the existing Rayfin session. This is already acknowledged inmicrosoft/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):
functionsservice sorayfin/functions/can be Python and deploy into the appBackend FuncSet, keepingclient.functions.invoke()consent-free.Steps to reproduce
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.Environment
Logs or screenshots