Forum Discussion
SaaS and Multi-Tenancy combined with Direct Query against Oracle in Power BI Embedded report
- Anonymous8 years ago
Thanks a lot!
Very useful topics for me! :-) I will dig into this!
Hi, and thanks for the respond!
Unfortunately the tenant-id is a unique number. Technically it is's comming from an Oracle Sequense that gives all the primary keys (tenant-id) a unique value in the rows (and the foreign keys, which will be the filter columns).
We have over 1000 tenants in the database. With RLS we then need to create a role for each tenant? It seems that it will be much manuel work to maintain.
Is this the only way to filter rows?
Reagrds
Aslak
This video from Reza Rad covers some advanced RLS topics that will probably help you https://www.youtube.com/watch?v=LcjIU0oOg0s&feature=youtu.be
You would probably need to create Role of Tenant - then dynamically assign users to that role. So the Roel can see only data from one tenant - and that filters down to all your tables. You would then need a way of mapping some user to some tenant. It would be similar to the example of assigning RLS based on their manager - in an org chart. Take user and look up tenant id
You can use USERPRINCIPALNAME() to access the currently viewing username and then filter https://powerbi.microsoft.com/en-us/blog/using-username-in-dax-with-row-level-security/
- Anonymous8 years agoNot applicable
Thanks a lot!
Very useful topics for me! :-) I will dig into this!