Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi All,
We have mulitple clients with separate copy of exactly same database schema on same SQL Server. I know how to create parameterized query within Power BI Desktop and then build separate copy of dashboard for each client using their database and upload all pbix files to power bi service (app.powerbi.com).
Please note, we are using these dashboards in our custom application (as embedded) so we show specific dashboards only to respective clients/users.
However as clients are increasing so it is hectic to keep uploading multiple files even dashboard is exactly same (using exact same visuals) and if we have to change any visual then we will have to update (re-build) all copies of dashboards and re-upload.
So is there anyway that we upload only single Dashboard (pbix) file to Power BI Service which will be using direct query via Gateway and then pass those Query Parameters (like Database name) dynamcially from Custom application to Gateway (based on user session) and Gateway fetch data from given database name (instead of static connection string)?
Please need an expert openion.
Solved! Go to Solution.
Hi @GilbertQ ,
Thank you for your message. How can we use this RLS with custom application? As mentioned before, we have App Workspace in Power BI Service through which we are embedding dashboards into our Custom Applications (ASP.Net MVC). So how can we pass this Role information from Custom Application to Dashboard?
2nd: I believe, RLS feature will work if Dashboard is using Direct Query. Right?
3rd: These dashboards will be readonly (we manage it through our custom application) however our App Workspace is configure to allow end users for Edit/Update dashboards (not these but other type of dashboards). So will it have any implication?
Thanks
Hi @GilbertQ ,
Thank you for your support.
However I couldn't understand your point 3 reply. Can you please give some detail.
Thank you.
Ok, that's not our case because our custom application users are not added in App Workspace. Thank you for clarificaton.
I have also implemented your suggested solution and it seems working fine. Just one last point, if we pass Roles information under GenerateToken Request for a dashboard that doesn't enabled RLS, then this throw error
Exception Details: Microsoft.Rest.HttpOperationException: Operation returned an invalid status code 'BadRequest'
Source Error:
Line 81: generateTokenRequestParameters = new GenerateTokenRequest("View", null, identities: new List<EffectiveIdentity> { new EffectiveIdentity(username: rlfUserId, roles: new List<string> { "RLS" }, datasets: new List<string> { datasetId }) }); Line 82: Line 83: var token = await client.Reports.GenerateTokenInGroupAsync(wsId, repId, generateTokenRequestParameters); |
So does it mean we can only pass "identities" if dashboard has enabled RLS? If yes then is there any better way to find this, before loading dashboard? We can used hard-coded dashboard names in condition at our side which have RLS enabled and then create token but it will become problem to update application everytime whenever we will have new RLS based dashbord. So is there any (automatic) bettter & professional way?
Thank you
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.