Forum Discussion
How to do Dynamic RLS in PowerBI without manually entering roles?
Hey Anonymous ,
I consider this requirement not possible, due to this simple fact: RLS is based on roles with rules assigned.
Theses rules are an essential part of the data model and can not be changed during querying.
I thinks the only viable approach is to create something called "JSON script filters", here you will find some more description: https://docs.microsoft.com/en-us/power-bi/developer/embedded/embedded-row-level-security#using-rls-vs-javascript-filters
Of course this is something that I would call: security by obscurity.
As this architecture is a more complex architecture, meaning there are three parties involved I would consider this approach:
- Your customers has to provide you with information about email and the key/value pair
- something (maybe an Azure function is executed triggerd by an Azure Logic App, the function executes a TMSL script and
voila a new role is created.
I have to admit, that I'm currently not sure if the data model has to be re-processed if a new role is added, my assumption: No!
Regards,
Tom