Connector authentication
Choose whether a connector runs as the signed-in user or as the app — auth.type values, defaults and allowed identities per connector type, validation, and the permissions each needs.
Choose connector authentication in rayfin/rayfin.yml before you deploy a connector.
The auth block controls whether runtime queries use the signed-in user's identity or the app's identity.
For the conceptual overview across auth, functions, connectors, and data policies, see Delegated access. For the sibling function surface, see Function connections.
Declare auth.type
Each connector entry has an auth: block. In context, the entry looks like this:
connectors:
- name: warehouse
type: fabric-warehouse
config:
workspaceId: <workspace-id>
itemId: <warehouse-item-id>
auth:
type: application
operations:
- name: read
- name: create
- name: update
- name: deleteThe value is lowercase: delegated or application. Other values, including uppercase
variants, fail validation, and omitting auth.type is a validation error.
npx rayfin connector add ... writes the type's default: application for Category A SQL
connectors, and delegated for fabric-semanticmodel and fabriciqmcp. The Category A
default changed in 1.36.
Set the identity at add time
Pass --auth to connector add to write a non-default identity without editing
rayfin.yml afterwards:
npx rayfin connector add --type fabric-sqldatabase --workspace-id <workspace-id> --item-id <item-id> --auth delegatedThe CLI rejects an identity the type does not allow before writing anything, for example
Invalid --auth "application" for connector type "fabric-semanticmodel". Allowed: [delegated].
Re-adding an existing connector resets auth.type to the type's default unless you pass
--auth again.
Use an allowed value for the connector type
rayfin up validates that auth.type is known and allowed for the connector type before
deployment starts.
| Type | Default auth | Allowed auth |
|---|---|---|
fabric-sqlanalytics | application | delegated, application |
fabric-warehouse | application | delegated, application |
fabric-sqldatabase | application | delegated, application |
fabric-semanticmodel | delegated | delegated only |
fabriciqmcp | delegated | delegated only New in 2.0 |
eventhouse | application | application only; existing connectors only Changed in 2.0 |
A disallowed value fails with
Connector "<name>" (<type>) does not support auth type "<auth>".
The Eventhouse adapter authorizes as the app owner and rejects a delegated caller token, so
eventhouse accepts only application. Its 1.36 predecessor, kusto, accepted only
delegated: migrate an existing entry as described in
Eventhouse. New Eventhouse
authoring is held in 2.0.0.
Run queries as the signed-in user
Use auth.type: delegated when each connector query should run as the signed-in user. The
runtime uses on-behalf-of token exchange, so the user needs their own permission on the
Fabric workspace and item. Rayfin does not grant source access on the user's behalf.
Delegated auth is what makes row-level policies meaningful for Category A connector
entities. The claims object in an @role() policy represents the real caller, so a policy
can compare claims.sub or claims.email to fields on the connector entity. See the
policy DSL and
connector entity generation.
fabric-semanticmodel and fabriciqmcp always run as the signed-in user.
Run queries as the app
Use auth.type: application when a connector should run as the app identity instead of the
caller. It is available for fabric-sqlanalytics, fabric-warehouse, and
fabric-sqldatabase, and it is the only identity for eventhouse.
Because the caller's identity is no longer in play, row-level policies keyed on claims no
longer distinguish users, and any row-level security at the source is evaluated against the
app owner. Do not choose application auth for per-user access control; enforce it in your
app instead.
Separate discovery permissions from runtime auth
Schema discovery during npx rayfin connector add ... runs under the developer's identity.
For Fabric SQL sources, that developer needs SQL endpoint permissions on the source so the
CLI can inspect tables and columns.
Runtime auth is separate. After deployment, connector queries use the configured
auth.type: the signed-in user for delegated, or the app identity for application.
For semantic models, npx rayfin connector invoke calls Power BI directly under the
developer's identity by default. That direct path needs Read and Build permissions on the
semantic model, not write access to the workspace. See
Semantic models.
In my Rayfin 2.0 project, review the connectors block in rayfin/rayfin.yml and set the
correct auth.type for each connector.
Use auth.type: delegated when queries should run as the signed-in user and the user has
permission on the target Fabric workspace and item. Use auth.type: application only for
fabric-sqlanalytics, fabric-warehouse, or fabric-sqldatabase when the connector should run
as the app identity. fabric-semanticmodel and fabriciqmcp accept only delegated, and
eventhouse accepts only application — rayfin up rejects any other combination. For a new
connector, pass `--auth delegated` or `--auth application` to `npx rayfin connector add`
instead of editing the file afterwards; re-adding an existing connector resets auth.type to
the type's default unless --auth is passed.
If the connector is Category A and uses @role() policies on generated entities, explain how
the chosen auth type affects claims-based row-level security. Then run `npx rayfin up` far
enough to catch connector validation errors and report the result.Eventhouse (KQL databases)
Run saved KQL queries against an existing Fabric Eventhouse KQL database from a Rayfin app, and migrate a Rayfin 1.36 kusto connector to the 2.0 eventhouse type.
Storage
Store files in a Fabric app with Rayfin Storage — declare @blob folders, register storageService on the client, and upload, download, list, and delete objects by path.