Forum Discussion
Embedded Power BI - Multiple Workspace Routing Dynamic
- Anonymous11 months ago
Hi cybertron,
Thanks for reaching out to the Microsoft fabric community forum. Yes, you can remove the static JSON and implement dynamic routing so the app discovers and routes to the correct client workspace at runtime using Power BI APIs and Azure AD authentication. You don’t need the JSON file, replace it with a small dynamic flow that asks Power BI “which workspaces can this signed-in user access?” and then routes/embeds the selected workspace’s report. You can make the app dynamic by using the Power BI REST API + Azure AD login. After the user signs in with MSAL, call GET /groups to list all workspaces they have access to. Now populate your dropdown from that response (external users will only see their client’s workspace, internal users will see multiple). On selection, call GET /groups/{groupId}/reports to get the report(s), then embed with either the user’s AAD token or a generated embed token. Power BI automatically enforces the permissions, so you can safely remove the static routing JSON.
This way routing is handled dynamically at runtime, and users are only shown the workspaces they’re actually allowed to access.
I would also take a moment to thank vivien57, for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference.
If I misunderstand your needs or you still have problems on it, please feel free to let us know.
Best Regards,
Hammad
Hi cybertron,
Just following up to see if the Response provided by community member were helpful in addressing the issue. If one of the response helped resolve your query, please consider marking it as the Accepted Solution. Feel free to reach out if you need any further clarification or assistance.
Best regards,
Prasanna Kumar