Forum Discussion
Dynamic Data Source based on dynamic parameter from login user session
- 7 years agoHi there
Please find below a link on how to use it with Power BI Embedded
https://docs.microsoft.com/en-us/power-bi/developer/embedded-row-level-security
2. It could work with DirectQuery if you are passing it down to a data source which supports single Sign On
3. Currently if a user is a member of an App Workspace RLS does not apply.
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
Please find below a link on how to use it with Power BI Embedded
https://docs.microsoft.com/en-us/power-bi/developer/embedded-row-level-security
2. It could work with DirectQuery if you are passing it down to a data source which supports single Sign On
3. Currently if a user is a member of an App Workspace RLS does not apply.
- malikirfan287 years agoHelper II
Hi GilbertQ ,
Thank you for your support.
However I couldn't understand your point 3 reply. Can you please give some detail.
Thank you.
- GilbertQ7 years agoSuper UserHi there
Currently people who are a member of an App Workspace do not have RLS applied to them when they view the reports or dashboards.- malikirfan287 years agoHelper II
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