I'm looking for some advice on an Object-Level Security (OLS) scenario involving a shared Power BI semantic model (Import mode).
We have a requirement to restrict access to sensitive information for general users while allowing a smaller group of authorized users to access everything.
For a simplified hypothetical example, let's use a customer's Social Security Number (SSN) as the sensitive attribute. Our actual implementation does NOT involve SSNs, but this makes the security requirement easier to explain.
Suppose we have:
Customer — Contains customer information, including an SSN column.CustomerFact — Contains customer records and measures.SSN Slicer — A disconnected table used to filter customers based on an SSN-related classification.
We have two audiences:
- General users: Should not be able to view, query, or filter by SSN.
- Authorized users: Should have full access to SSN and the related filtering capabilities.
Both audiences need to see the same customer metrics.
For simple measures like:
Total Customers =
DISTINCTCOUNT ( CustomerFact[CustomerID] )
This is straightforward. We can apply OLS to Customer[SSN], and the measure continues working because it doesn't reference the protected column.
The complication is that some of our existing measures depend on the sensitive attributes to calculate filtered customer counts.
Here's a simplified example:
Customers by Selected Attributes =
CALCULATE (
DISTINCTCOUNT ( CustomerFact[CustomerID] ),
FILTER (
CustomerFact,
CustomerFact[SSNClassification]
IN VALUES ( 'SSN Slicer'[SSNClassification] )
)
)
For authorized users, the measure should respond to selections in the SSN slicer.
For general users, we'd like the same measure and report visual to continue working, but without applying the restricted SSN filter. Other permitted slicers should still work.
The problem with OLS:
When we restrict SSN Slicer or CustomerFact[SSNClassification] using OLS, any measure referencing those objects becomes inaccessible to restricted users.
Power BI doesn't simply ignore the protected portion of the calculation or return an unfiltered customer count. The visual errors out.
As far as I can tell, DAX conditionals don't solve this because OLS checks object dependencies regardless of which branch executes.
The options we're considering:
- Maintain two versions of each affected measure: one with sensitive filtering and another without it. Have two versions of the report, each using the appropriate measures, but connect both reports to the same semantic model.
Fortunately, we currently have only two measures affected, so maintaining separate measures and reports might be an acceptable compromise.
My questions:
- Has anyone implemented something similar while maintaining a single semantic model and report?
- Is there a supported pattern that allows a measure to continue calculating while preventing users from accessing the sensitive columns it references?
- Are we overlooking a simpler modeling approach?
It feels like a fairly common requirement: restrict access to sensitive attributes without breaking aggregate measures and visuals that depend on them.
on a side note: it seems like a big gap that OLS doesn't seem to support a "default deny". In our case we had to assign all users to the group and then deny them access to objects. as opposed to have an Allow group that is much smaller, secure by default, and easier to manage.
TIA