Object-level security
Objects are a different security boundary
Object-level security (OLS) prevents restricted model readers from discovering or querying designated tables or columns, including their metadata. Row-level security (RLS) instead restricts rows. Setting IsHidden, using a perspective, or omitting a field from a report is only a presentation decision. A reader with Build may still query an ordinarily hidden object. In a governed model, use OLS when a consumer must not access the object at all.
Define a complete consumer role
This isolated Import model uses Sales(SaleID, Region, Revenue, Cost), and a disconnected Payroll(EmployeeKey, Salary). Set Cost hidden only for the initial negative control; remove that misconception by explicitly denying Cost and Payroll in the NorthReader role. Import Sales and Payroll from the lab CSVs; use text keys and whole-number amounts. Create the role locally with a compatible TMDL view or Tabular Editor. Preview changes and save only a disposable copy. The following candidate TMDL replaces the named role, so use a new role name and inspect the diff; never overwrite a production role.
createOrReplace
role NorthReader modelPermission: read
tablePermission Sales = Sales[Region] = "North" columnPermission Cost metadataPermission: none
tablePermission Payroll metadataPermission: noneThe role combines the row predicate and object restrictions in one definition. The exact script must be previewed and validated against the installed build. Tabular OLS requires compatibility level 1400 or later; authoring and XMLA access also depend on product capabilities and configuration. Do not mix independent RLS-only and OLS-only roles: documented combinations may produce query-time errors. Reject unreviewed multiple-role assignments in this lab.
Example 1 — permitted query and denied objects
NorthReader can query Sales[SaleID] and Sales[Revenue]. Define Revenue = SUM(Sales[Revenue]) and Profit = SUM(Sales[Revenue]) - SUM(Sales[Cost]) as model measures in the disposable model.
EVALUATESELECTCOLUMNS(Sales, "ID", Sales[SaleID], "Amount", Sales[Revenue])ORDER BY [ID]Predicted: S01 100 and S02 60, total 160. EVALUATE SELECTCOLUMNS(Sales, "Cost", Sales[Cost]) and EVALUATE Payroll must fail for this reader rather than return zeros or masked values. A measure depending on Cost is restricted too; EVALUATE ROW("Profit", [Profit]) is a negative test. Rebuild public visuals with permitted measures rather than suppressing errors.
Example 2 — hidden field and elevated control
In a disposable copy without OLS, hide Cost and give an approved test reader Build plus North RLS. Cost remains queryable; expected North costs are 60 and 45, total 105. With OLS enabled the same query must be denied. A model editor with Write can read all four Sales rows and Payroll despite the consumer role. Expected total revenue 280 and profit 100. Separate editor identities from consumer identities. A source database can have its own column and row policies; Import refresh uses its configured source identity, so source policy is not automatically re-evaluated for each report viewer.
Design and compatibility cautions
Do not deny a table needed as the only intermediate hop in a relationship chain. A secured column can participate in relationships when its containing table remains accessible, but verify the intended design. Some visual features, including smart narratives, quick insights and Excel Data Types, are documented as unsupported for models with OLS. Treat other clients and modes as requiring explicit verification. A model without a valid role grant must not default to unrestricted data. Review all derived measures and all read paths, not just field-list appearance.
Practice and documentation
Predict the exact rows and object errors for NorthReader, a hidden-only control and an editor. In a local approved model compare metadata discovery and explicit queries; fill the native observation worksheet, leaving NOT RUN where necessary. Explain why a hidden Cost column cannot protect confidential margins.
Documentation reviewed 2026-11-29 (two OLS page extracts; other topics from search extracts). Native build and execution NOT RUN.
- https://learn.microsoft.com/en-us/fabric/security/service-admin-object-level-security
- https://learn.microsoft.com/en-us/analysis-services/tabular-models/object-level-security?view=sql-analysis-services-2025
- https://learn.microsoft.com/en-gb/fabric/data-warehouse/column-level-security
- https://learn.microsoft.com/en-us/power-bi/connect-data/service-datasets-permissions
- https://learn.microsoft.com/en-us/power-bi/enterprise/service-premium-connect-tools/
- https://learn.microsoft.com/en-us/analysis-services/tmdl/tmdl-overview?view=sql-analysis-services-2025