Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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.
Solved! Go to Solution.
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.
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..
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.
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.
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.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!