Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
cybertron
New Member

Embedded Power BI - Multiple Workspace Routing Dynamic

Hi,

We have a angular web application embedded with Power BI Reports. We have created workspaces specific to each client (1 power BI workspace per client). An external client user can only access their specific workspace because of the angular application. The angular app restricts the user from accessing any other client workspace.

However, we have internal users that require access to multiple client workspaces and have the ability to switch between clients through a dropdown selection in the angular application. 

 

Currently, the routing to each specific workspace by client is managed through a JSON config file in the application and based on the client selected in the dropdown, the routing to the specific workspace is controlled. 

 

Is there a way we can remove the json file and dynamically route the users dynamically to client specific workspace through the Power BI APIs based on the selection from the dropdown?

 

Here is the sample workflow of how I am imagining

 

Below are the scenarios 

 

User   Client   Permission
External User A   Client X   Viewer
External User B   Client Y   Viewer
Internal User C   Client X   Viewer
Internal User C   Client Y   Viewer
Internal User C   Client Z   Viewer

 

User A logins into the platform, the PBI service verifies user A has access to Client X workspace and routes him to Client X workspace

User B logins into the platform, the PBI service verifies user B has access to Client Y workspace and routes him to Client Y workspace

 

User C logins to the platform with default client selected as Client X, application verifies the access, and PBI service logs him into the Client X workspace. User C then switches the client from X to Y and PBI service identifies user is requesting to switch to Client Y and routes him to Client Y workspace. 

2 REPLIES 2
v-mdharahman
Community Support
Community Support

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

vivien57
Impactful Individual
Impactful Individual

Hello @cybertron ,

I recommend posting your question in this category.

https://community.fabric.microsoft.com/t5/Service/bd-p/power-bi-web-app

You are currently in the ‘Report Server’ category, which concerns the Power BI On-Premise product (which does not seem to be your case, as you mention Workspace).

Have a nice day,

Vivien




Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.