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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
cybertron
Regular Visitor

Embedded Power BI - Dynamic Multiple Workspace Routing

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. 

1 ACCEPTED SOLUTION
Poojara_D12
Super User
Super User

Hi @cybertron 

What you want to achieve is possible, but it requires shifting away from a static JSON routing file and instead leveraging the Power BI REST APIs and the security model to dynamically determine which workspaces a user has access to. Right now, your Angular app is enforcing access logic, but Power BI itself already tracks user permissions at the workspace level. A cleaner approach would be: when a user logs into your Angular app, use their Azure AD token to call the Power BI REST API (e.g., List Groups endpoint) to fetch the list of workspaces they have access to. From there, you can filter these workspaces to those that match your “client workspaces” convention (like Client X, Y, Z). This eliminates the need for a JSON config because the application dynamically builds the workspace dropdown based on what the API returns. When a user selects a client from the dropdown, your app simply switches the embed configuration to point to the report(s) in the corresponding workspace. External users will only ever see their one workspace because the API will only return that single workspace for their account, while internal users will see multiple options to switch between. Essentially, you’re letting Power BI’s service and APIs handle the access control, and your Angular app just consumes that information to render the correct embed.

 

Did I answer your question? Mark my post as a solution, this will help others!
If my response(s) assisted you in any way, don't forget to drop me a "Kudos"

Kind Regards,
Poojara - Proud to be a Super User
Data Analyst | MSBI Developer | Power BI Consultant
Consider Subscribing my YouTube for Beginners/Advance Concepts: https://youtube.com/@biconcepts?si=04iw9SYI2HN80HKS

View solution in original post

4 REPLIES 4
v-hashadapu
Community Support
Community Support

Hi @cybertron , Thank you for reaching out to the Microsoft Community Forum.

 

We find the answer shared by @Poojara_D12  is appropriate. Can you please confirm if the solution worked for you. It will help others with similar issues find the answer easily.

 

Thank you @Poojara_D12  for your valuable response..

v-hashadapu
Community Support
Community Support

Hi @cybertron , hope you are doing great. May we know if your issue is solved or if you are still experiencing difficulties. Please share the details as it will help the community, especially others with similar issues.

Poojara_D12
Super User
Super User

Hi @cybertron 

What you want to achieve is possible, but it requires shifting away from a static JSON routing file and instead leveraging the Power BI REST APIs and the security model to dynamically determine which workspaces a user has access to. Right now, your Angular app is enforcing access logic, but Power BI itself already tracks user permissions at the workspace level. A cleaner approach would be: when a user logs into your Angular app, use their Azure AD token to call the Power BI REST API (e.g., List Groups endpoint) to fetch the list of workspaces they have access to. From there, you can filter these workspaces to those that match your “client workspaces” convention (like Client X, Y, Z). This eliminates the need for a JSON config because the application dynamically builds the workspace dropdown based on what the API returns. When a user selects a client from the dropdown, your app simply switches the embed configuration to point to the report(s) in the corresponding workspace. External users will only ever see their one workspace because the API will only return that single workspace for their account, while internal users will see multiple options to switch between. Essentially, you’re letting Power BI’s service and APIs handle the access control, and your Angular app just consumes that information to render the correct embed.

 

Did I answer your question? Mark my post as a solution, this will help others!
If my response(s) assisted you in any way, don't forget to drop me a "Kudos"

Kind Regards,
Poojara - Proud to be a Super User
Data Analyst | MSBI Developer | Power BI Consultant
Consider Subscribing my YouTube for Beginners/Advance Concepts: https://youtube.com/@biconcepts?si=04iw9SYI2HN80HKS
GilbertQ
Super User
Super User

Hi @cybertron 

 

Why not just add the user to the same flow that you do for your external client, so when they log in they will see the client's permissions.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.