Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
VeemalS
Helper I
Helper I

OLS security in Composite Models

I would be interested to know whether OLS Security can work in a composite model environment. To be precise I have a model with many fact tables. But not all fact tables need to be visible and accessible to all users. I have a central model where all dimensions have been included in import mode, Where as the Fact Tables have been added remotely ( PBI Datasets). The purpose of doing it this way is to limit the size of the model to less than 1 GB as we are only using Power BI Pro Licenses. However, we noticed that OLS will not work on the remote tables. So, those tables will remain accessible when deployed to users.

 

Is there any workaround for the above constraint?

 

Thanks

 

Veemal

7 REPLIES 7
bcdobbs
Super User
Super User

Hi,

If you look down https://powerbi.microsoft.com/en-us/blog/directquery-for-power-bi-datasets-and-azure-analysis-servic... you will see that in the "Behaviour to Note" it specifically talks about RLS but the same applies to OLS.

 

I think if you define the OLS rules in the central dataset rather than your local model it should work.


One thing to be careful of is how you've granted build permissions on the central dataset. These are needed for composite models to work however if you give people member/contributed/admin roles on the workspace of the central dataset it disables RLS/OLS. You want to remove users from the workspace and directly assign just build permissions and have your report in a separate workspace. (Cross workspace datasets might need to be enabled in tennant settings)



Ben Dobbs

LinkedIn | Twitter | Blog

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!

in fact this is the issue that I am facing. In the central dataset ( Imported Dimensions) , when I try to set the OLS security on the Direct query Tables I encounter an error on Tabular editor as follows:

 

VeemalS_0-1645268664376.png

 

So I am not able to set any security on the Direct Query Tables at the moment.

 

That looks like you're trying to apply the OLS in your composite model (it's saying those tables are being accessed via direct query).

To use OLS you need to set the roles relevant to those tables in their own dataset (eg the one you're currently connecting to)



Ben Dobbs

LinkedIn | Twitter | Blog

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!

I did that and I tested it on PBI desktop from the main dataset. I have checked same using 'view as' function but I don't see any diiference i.e the fact tables that I have made hidden via OLS can still be seen when I use the role of that particular user.

 

Do i need to publish the main dataset model and check whether it is working on the workspace?

 

Thanks

 

Veemal

Hi @VeemalS, The good news is OLS certainly does work in composite models. However it's fiddle to check!.

 

I'll refer to the two models as follows:

 

Base - your main power bi dataset.

Composite - your new composite model.

 

To protect tables in the Base model you need to set the OLS/RLS within that model.

 

If you publish both to the service and add user to the correct roles in the Base model it will work. 

 

However I can't find an easy way to test it within the service. "View As Role" on the composite model only impersonates the roles of that model not the base one.

 

The only way I could test it was as follows (needs premium per user / premium capacity to connect to xlma end point).

 

1) Add a test user to the OLS role in the Base dataset (user needs build permissions on both datasets but can't be anything higher than viewer in workspace.)

bcdobbs_0-1645284973707.pngbcdobbs_1-1645285010508.png

2) Open DAX Studio and connect to your XLMA end point for workspace but expand Advanced Options and enter your test user in "Effective User Name"

bcdobbs_2-1645285268851.png

3) Use drop down to select your composite model:

bcdobbs_3-1645285329119.png

4) In my example RemoteMember has OLS applied to it. It looks like it hasn't worked but if you try to query it you get the following:

bcdobbs_4-1645285384222.pngbcdobbs_5-1645285426788.png

 

Hope that helps. If you don't have XMLA end point you'd have to get a user to test with you. You can't test yourself because you'll have higer rights on the workspace.

 

I might try and write this up as a Blog post giving a bit more detail.

 



Ben Dobbs

LinkedIn | Twitter | Blog

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!

I've just realised there is an easier way to test direct in service!

 

Same setup as above but I added an empty security role in the composite dataset just to enable stuff in the service. Once done if you go into security for the composite model and test as role:

bcdobbs_0-1645342558320.png

This on it's own won't do it as you're only testing the role local to the composite model. However once there at the top you can then impersonate a test user:

bcdobbs_1-1645342630239.pngbcdobbs_2-1645342682414.png

 



Ben Dobbs

LinkedIn | Twitter | Blog

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!

I'm away from a computer at the moment but as soon as I can will set up a test environment to check it can work.



Ben Dobbs

LinkedIn | Twitter | Blog

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.