microsoft / microsoft/rayfin

Authentication error with Rayfin App to expose Fabric Data Agent

Open
#65 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug issue-mapped triaged
Dominant language
No language data
Stars
610
Forks
62
Avg merge
1d 23h
Merged PRs (30d)
3

Description

What happened?

I am trying to build a rayfin app by exposing my Fabric Data Agent so that end user can launch this Fabric App portal to chat with Fabric agent that I built. However, the Fabric app keep failing with authentication error

"Error: No Fabric API token. Complete Azure Portal API Permissions (Fabric API, Admin Consent) or set VITE_FABRIC_AGENT_TOKEN in env.local and rebuild."

I would like the Fabric app to use simple authentication per logged in user to Fabric Tenant's workspace. Whoever granted contributor access to the workspace, should be able to launch this Fabric app and chat with Fabric data agent. How do I go about to achieve this ?

Steps to reproduce
  1. run npm create @microsoft/rayfin@latest -- SupplyChain_V2 --workspace 'xxx'
  2. selected msft template
  3. selected bare bone app
  4. followed the rest of the instruction, then execute npm run dev
  5. move over to Copilot Chat windows in my VS code, then prompt :

Build an Agentic front end App for Veridian Consumer Brands which is a mid-sized Consumer Packaged Goods manufacturer. Taking design inspiration from 03_Inputs\Requirements\CGS Commercial_AI4BI Demo_Slides.pdf - slide #4. Hook up to Fabric Data Agent here :
[https://api.fabric.microsoft.com/v1/mcp/workspaces/{WorkspaceId}/dataagents/{DataAgentId}/agent]
-- I put in the proper URL copied from Fabric Data Agent MCP section

1) Give the Fabric  App a nice Logo & Branded Header  design for Veridian CPG company
2) KPI Bar - 6 CPG metrics — Revenue, Volume, Gross Margin, Market Share, On-Shelf Availability, Promo ROI. Place it on top of the page.
3) AI Chat - Streaming responses from the Fabric Data Agent with typing indicator and stop button.  Give enough space between this KPI Bar and AI Chat section so that this section stands out in the UI as the focal point. 
4) Suggested Prompts: 6 CPG-relevant questions or suggested prompts to the bottom. This should not be the focal point on this page. It should smaller font and taking up smaller real estate and appear at the bottom of this page. 

Follow the instructions how to query a published data agent through it's MCP endpoint to authenticate in this front end app you are building. You will find the instruction here Fabric data agent Python SDK (preview) - Microsoft Fabric | Microsoft Learn , under the topic "Query a published data agent"

User permission to Fabric tenant should be used to access the Fabric app and Fabric Data Agent and it's backend data. Co's the user granted access to fabric workspace and therefore should be used for authentication and authorization to ALL fabric items without additional security or permission setup.

Environment

No response

Logs or screenshots

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the generated bare-bone app with the reported npm create command and npm run dev, then read the Fabric Data Agent SDK instructions for the MCP endpoint authentication flow. Done means a signed-in workspace contributor can launch the app and query the agent without manually setting VITE_FABRIC_AGENT_TOKEN.

Written by the indexing model from the issue text.

Assessment

Tech stack
vite
Domain
api, authentication, cloud
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.