Row-Level & Object-Level Security
Control what data users see. RLS, CLS, OLS, and file-level security — same report, different data per user.
Data-level security
Think of a hospital records system. A nurse on cardiology sees heart patient records (row-level). The billing team sees billing columns but not clinical notes (column-level). Nobody knows the drug trial table exists (object-level).
Row-Level Security (RLS)
RLS filters rows based on user identity using a security mapping table:
-- Role: RegionalAccess — filter on dim_store
[Region] IN
SELECTCOLUMNS(
FILTER(SecurityMapping, SecurityMapping[UserEmail] = USERPRINCIPALNAME()),
"Region", SecurityMapping[Region]
)
CLS vs OLS
| Feature | Column-Level (CLS) | Object-Level (OLS) |
|---|---|---|
| Data visible? | No — returns blank/restricted | No — column/table hidden from metadata entirely |
| Column in field list? | Yes — users know it exists | No — users do not know it exists |
| Measures referencing it | Return blank for restricted users | FAIL for restricted users |
| Configuration | Tabular Editor / XMLA | Tabular Editor / XMLA |
Dr. Sarah needs cardiology doctors to see only cardiology patients. How?
Raj needs to hide a Salary column in a semantic model so non-HR users do not even know the column exists. Which security feature should he use?
🎬 Video coming soon
Next up: Sensitivity Labels & Endorsement