I've followed this to enable powerbi for my portal. https://www.alphabold.com/embedding-power-bi-dashboard-report-in-power-apps-portal/
I've noticed that the report is actually unsecured. I'd love to enable security around it, but I'm not sure how to achieve it as my portal contacts are associated to many clients. Is RLS achievable? Has anyone done something similar and able to point me in the right direction?
Hi @skoofy5
The answer is yes it is 100% achievable. Powerapps portal is capable of showing only the clients are entitled to see via Portal WebRoles + Power BI RLS
Here are the high-level steps for your reference:
The steps are:
In PowerApps Portal:
1. Create relevant web roles according to your POWERBI Data tables
2. Assign contact to relevant webroles
3. In Portal Studio > Sync configuration > Browse website.
Hope it helps.
------------
If you like this post, give it a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users to find it.
How do I create a role I can apply to the viewing portal contact dynamically? I imagine I would somehow need to pass through the contact ID? The other side to this that I'm also seeking assistance is how to create the PowerBi role that can take that contact ID and ensure they're in that 1:M relationship.
It seems like perhaps this isn't available - https://powerusers.microsoft.com/t5/Power-Apps-Ideas/Power-Apps-Portal-true-RLS-with-Power-BI-Extern...
Hi @skoofy5 ,
Even I have voted that idea long back which you have shared. But we have achieved it by creating roles in PowerBI and applied RLS. In Portal, we have assigned appropriate web roles.
Note: You need to use Power BI desktop
1. Create roles within the report
Open the report on Power BI Desktop.
On the top menu, select Modelling, then Manage Roles.
Create a role called "All users"
Create one role for each active table in Tables, naming them with the proper name you like as displayed below
For the Role, All Contracts, simply leave it with no filters.
For the roles <Other Tables>, set up a filter on your other table, pointing to that table name.
Make sure the contract name typed in the filter matches the contract name in the table.
Apply the same filter for all other tables on the list.
Click Save.
Important step:
2. Assign security groups to RLS
Open Power BI Service (https://app.powerbi.com/ )
In the workspace, click datasets + dataflows
Select the report
Open the 3 dots menu on the right-hand side of the report
Select Security
Over each role, Create and include the AD group that contains the external users (Clients, Partners) for that specific contract. Repeat the same for every table.
Then the final step will be allow the user to sign in to your Portal. Once signed in they have to sign out
Then In portal management
1. Click contacts > Find the external contact > Add Existing web role and assign appropriate web role.
I have detailed as much as I can. In a nutshell, it is working properly so far for us.
Hope it helps.
------------
If you like this post, give it a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users to find it.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.